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
RaghavenderRaghavender 

How many records are fetched using Trigger.new

Hi ,

 i have an External System (8 servers) Pumping data into a  Custom Object of  SFDC. now if i have a trigger on this Custom Object and try retriening the Data using Trigger.new . how many records do i get.

 

 

Another Question is :

For Each data insert, does a new trigger gets executed...say for 'n' number of records inserted, do we have 'n' number of triggers running.

 

 

Please provide your clarifications as soon as possible ..

Thank you..

 

 

paul-lmipaul-lmi

all the doc says triggers should be written to handle 200 records at a time, so i'm assuming that's what your answer is.  to answer the second question, yes, it's a new trigger operation for each set of records (200).

RaghavenderRaghavender

Hi , Thanks for your reply.

 

but say there are 8 servers pumping itn Data to a custom Object, and i have a After Insert trigger on this Custom Object.

In this case, will each data base Insert result in a different Trigger .

 

I.e 8 data base Inserts reult in 8 Triggers fired and executing..?

 

 

Thanks in Advance

paul-lmipaul-lmi
it doesn't matter how many servers you have. because you're running this in parallel, your data cannot be serial. if you want serial, you need to use the bulk data API instead, and ensure your data is inserted serially. every 200 records is its own trigger execution.