Skip to main content
Tweeted twitter.com/#!/StackSalesforce/status/316502715633106945
Escaped a double underscore to remove unintended italics: Parent__c changed to Parent\__c
Source Link
Peter Knolle
  • 29.2k
  • 12
  • 104
  • 164

Imagine I have 5 users working in a training on the same Sobject type (Parent__c). They all have a page where they can create 50 child objects (Child__c) with the single click of a button.

Assume there exits a Trigger for Child__c. We all now Triggers work bulkified for up to 200 records.

How does Salesforce share the work between trigger instance

  • 5 trigger instance for 50 records each are fired
  • 3 trigger instance for 200, 200, 50 records are fired

This is relevant to me because my trigger fires a Batch job to prevent Limit execptions from subsequent triggers. If each user gets his own instance (Case 1) I might run into the 5 Batches in Parallel Limit. But even in Case 2 if more than 1000 records are saved in parallel I will hit my limit.

Imagine I have 5 users working in a training on the same Sobject type (Parent__c). They all have a page where they can create 50 child objects (Child__c) with the single click of a button.

Assume there exits a Trigger for Child__c. We all now Triggers work bulkified for up to 200 records.

How does Salesforce share the work between trigger instance

  • 5 trigger instance for 50 records each are fired
  • 3 trigger instance for 200, 200, 50 records are fired

This is relevant to me because my trigger fires a Batch job to prevent Limit execptions from subsequent triggers. If each user gets his own instance (Case 1) I might run into the 5 Batches in Parallel Limit. But even in Case 2 if more than 1000 records are saved in parallel I will hit my limit.

Imagine I have 5 users working in a training on the same Sobject type (Parent__c). They all have a page where they can create 50 child objects (Child__c) with the single click of a button.

Assume there exits a Trigger for Child__c. We all now Triggers work bulkified for up to 200 records.

How does Salesforce share the work between trigger instance

  • 5 trigger instance for 50 records each are fired
  • 3 trigger instance for 200, 200, 50 records are fired

This is relevant to me because my trigger fires a Batch job to prevent Limit execptions from subsequent triggers. If each user gets his own instance (Case 1) I might run into the 5 Batches in Parallel Limit. But even in Case 2 if more than 1000 records are saved in parallel I will hit my limit.

Source Link
Robert Sösemann
  • 38.2k
  • 29
  • 173
  • 508

How does Salesforce share the work from different users between trigger instance?

Imagine I have 5 users working in a training on the same Sobject type (Parent__c). They all have a page where they can create 50 child objects (Child__c) with the single click of a button.

Assume there exits a Trigger for Child__c. We all now Triggers work bulkified for up to 200 records.

How does Salesforce share the work between trigger instance

  • 5 trigger instance for 50 records each are fired
  • 3 trigger instance for 200, 200, 50 records are fired

This is relevant to me because my trigger fires a Batch job to prevent Limit execptions from subsequent triggers. If each user gets his own instance (Case 1) I might run into the 5 Batches in Parallel Limit. But even in Case 2 if more than 1000 records are saved in parallel I will hit my limit.