Symptom
When "Execute rules for all records" in Rule Execution Criteria is enabled under Object Configuration of Manage Data, business rule under Child Object will trigger workflow and throws an application error.
If disable "Execute rules for all records" in Rule Execution Criteria, the Workflow can be triggered successfully.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
Reproducing the Issue
- Create two custom Objects in Configure Object Definitions page, then associate one Object as Child and one Object as Parent.
- Configure a business rule for Child Object to trigger workflow.
- Go to Manage Data > Object Configuration, search for the parent object and enable "Execute rules for all records" for it.
- Go to Manage Data page and create new record to trigger workflow >There would be Application error.
- If disable "Execute rules for all records", it would trigger workflow successfully.
Cause
The issue is caused by the externalCode datatype of Child Object is Autonumber.
Resolution
Please follow below steps to modify datatype for externalCode.
- In Configure Object Definitions page, change the externalCode datatype of the child object to String or Number and make the externalCode Field as Readonly
- Create the new rule which generate the externalCode using the Testsequence and attach it to the save rule of child's object definition
a. Example configuration of Business Rule for Number DataType
b. Example configuration of Business Rule for String DataType
Example of TestSequence:
See Also
Keywords
child object,parent object,business rule,Execute rules for all records,fail to trigger workflow,Rule Execution Criteria , KBA , LOD-SF-MDF-OBJ , Object Definition & Field Related Issues , Problem