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
reatlimecoreatlimeco 

Anyway to get a list of the fields that a sObject currently has (in memory)

I am looking for a way to get a list of the fields that have changed from within a trigger that doesn't require getting the full list of fields on an object and looping through them to find out which changed, which is going to use up a lot of cycles of the governor limit doing this.

Alex.AcostaAlex.Acosta

Use Trigger.new to get a List of updated records...

 

IE:

 

List<Account> accounts = trigger.new;

 

more information can be found here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables.htm