Contents
Overview
When generating subscriptions/orders in CloudSense using SFDC batch processing for order decomposition (batch mode), the process can fail with a managed-package trigger error referencing csordtelcoa.AllServiceTriggers. This typically occurs when the SM Options custom setting disable_triggers__c is set to false, which can cause reverse mappings to invoke a Future method—blocked by Salesforce in Batch context.
The mitigation is to set SM Options → disable_triggers__c = true for batch mode, and when reverse mappings are required, use the documented approach of calling processReverseMapping before MACD creation.
Solution
Error signature (how to recognize this issue)
You may be impacted if AsyncApexJobs/debug logs show a failure similar to:
First error: Insert failed. First exception on row 0; first error:
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, csordtelcoa.AllServiceTriggers: execution of AfterInsert
caused by: System.DmlException: Update failed. First exception on row 0 with id <record_id>...
This is commonly reported during a flow like:
- Create Opportunity
- Add Service Location
- Create Product Basket → add products
- Generate product configurations → edit configurations
- Click “Sync Forecasted Products”
- Change Opportunity Stage to “Ordered”
Conditions where this typically occurs
- Your org is using SFDC batch processing for order decomposition (batch mode).
- The error is thrown from a managed package trigger/class (
csordtelcoa.AllServiceTriggers), so the code cannot be viewed/modified directly. - The SM Options custom setting is not configured for batch mode.
Root cause (what is actually failing)
When SM Options → disable_triggers__c is false, CloudSense may initiate reverse mappings on Service record updates that invoke a Future method.
Salesforce restriction:
- Future methods are not permitted in Batch context.
Because order decomposition is running in Batch context, the managed trigger’s AfterInsert path fails, resulting in:
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITYand an underlyingSystem.DmlException.
Resolution (configuration change)
Step 1 — Update SM Options for batch mode
- In Salesforce Setup, navigate to Custom Settings.
- Open SM Options (CloudSense custom setting).
- Locate the setting/field:
disable_triggers__c - Set:
disable_triggers__c = true - Save.
Why this works: With triggers disabled for batch mode, the reverse-mapping path that relies on Future methods is not invoked during batch processing.
Step 2 — If reverse mappings are required, use the documented batch-mode approach
When operating in batch mode (triggers disabled), follow the documented guidance to:
- Call the
processReverseMappingAPI before MACD creation, if your process requires reverse mappings to be applied.
Note: Implementation specifics depend on your existing automation/integration pattern. Ensure the API call occurs prior to the MACD creation step in your batch-mode workflow.
Verification
- Re-run the same reproduction steps in your sandbox (Opportunity → basket → generate configs → sync forecasted products → Stage = Ordered).
- Confirm the subscription/order generation completes successfully.
- Check AsyncApexJobs:
- No new failures referencing
csordtelcoa.AllServiceTriggers.
- No new failures referencing
- Confirm downstream expected artifacts are created/updated (e.g., decomposition outputs, orders/subscriptions, related Service updates) according to your standard process.
Frequently Asked Questions
- 1. How do I know if I’m hitting this exact issue?
-
Check AsyncApexJobs/debug logs for:
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, csordtelcoa.AllServiceTriggers: execution of AfterInsertSystem.DmlException: Update failed...
If you’re also running order decomposition in Salesforce batch mode, this article likely applies.
- 2. Why does
disable_triggers__c = falsecause failures in batch mode? -
With
disable_triggers__cset to false, CloudSense can invoke reverse mappings on Service updates that use a Future method. Salesforce blocks Future methods inside Batch execution, so the managed trigger fails and surfaces asCANNOT_INSERT_UPDATE_ACTIVATE_ENTITY. - 3. What should
disable_triggers__cbe set to when using SFDC batch processing for order decomposition? -
Set
disable_triggers__c = true(triggers disabled) to avoid Future-method execution inside Batch context. - 4. If triggers are disabled, how do reverse mappings happen?
-
In batch mode, use the documented approach: call the
processReverseMappingAPI before MACD creation when reverse mappings are required for your workflow. - 5. The error persists after setting
disable_triggers__c = true. What should I check next? -
Verify the following:
- Order decomposition is still running in batch mode as expected.
- The SM Options setting was changed in the correct scope (org/record hierarchy as applicable).
- No other automation is invoking Future methods during the same transaction.
Re-check AsyncApexJobs for the newest failure details and the first failing record
<record_id>to identify what operation is still occurring in Batch context.
Matej Storga
Comments