function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
James Sherrard0742540083538499James Sherrard0742540083538499 

Apex trigger possbility

I apologize in advance if I don't give enough information or the question isnt clear. I'm new to apex and not sure if this needs to be accomplished via a trigger or a class. 

I grabbed what appears to be a pretty well used trigger and class for rolling up fields from a custom object and customized the trigger for my needs. It works, sort of. I think my issue is because I have some formula fields that feed back and forth between the standard "Contact" object and my custom object for maybe 2 round trips. 

The outcome of the issue after the trigger runs is that I have to go into the custom field, open a record but not actually change anything, save the record, and then the outcome is correct. Is there anyway to force an update of all the objects involved either via a trigger or class? So what is more or less a fake update of a record doesn't have to be done.

I can attach any info needed. 

Thanks,

James
Boom B OpFocusBoom B OpFocus
Hi James,

Have you tried to export  the IDs of all the records from the object that you want the trigger to fire and update them using Data Loader?  It is kind of similar to what you did with edit each record individually and save, but the Data Loader will update all the records at once.


James Sherrard0742540083538499James Sherrard0742540083538499
Boom,

I haven't tried that. Although I can see that being a solution on a mass level, I do need to find a solution on a individual basis. I have end users that may edit individual records and we more or less need a fail safe that it will auto calculate the first run through instead of have an extra step for the end user. 

Thanks,

James