Forum Post: RE: Validating on when a related record was attached

  • Thread starter Thread starter Godfrey Sorita
  • Start date Start date
Status
Not open for further replies.
G

Godfrey Sorita

Guest
Hi Katie, Pulling the data on the audit trail might cause performance issues on your trigger in the future. Instead, you can create a trigger which updates a specific date field whenever the lookup field is updated. Below are the simple steps to accomplish this: 1. Create an Update Field Value trigger. 2. Set the Timing to 'After Update'. 3. Select the lookup field on 'On Field Change'. 4. Paste this code to the formula body to set the current date, relative to the current user's time zone: new Date(rbv_api.getCurrentDate()); 5. Make sure the query API permission are enabled for this object and save the trigger. Regards, Godfrey

Continue reading...
 
Status
Not open for further replies.
Back
Top