Symptom
For an MDF Generic custom Object or Foundation Object, on creation of new iterations of the object, the external code should auto-generates and increments by 1 (or more)
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental
Environment
- SAP SuccessFactors Employee Central: Foundation Objects & Payment Information Object
- SAP SuccessFactors HXM Core: Metadata Framework Custom MDF object
Cause
This can be achieved via a business rule.
Resolution
To successfully auto generate external code values for your MDF Object please carry out the following steps:
1. Set the external code field on your MDF Object to Read Only
2. Create your sequence object. Ensure the "Step" is set to "1" and not "0". "0" is not a supported external code value
3. Create a rule which lists your MDF object as the base object. In the "Template" field, you can add a marker that will appear before the number count as part of your objects external code e.g. "OBJ_".
4. Set the rule as an OnSave rule. Setting the rule as an Initialize rule is not supported.
5. Test by creating your first custom obj. Create new, add details and save.
Please Note:
If you are using business rule, to raise validation messages. These rule must be triggered as Validate Rules and not Save Rules.
If you trigger the raise message rules, as Save Rules this can cause you to see jumps in your sequence.
See Also
2475948 - Automatic Generation of Foundation Object Code
2421728 - How to Autogenerate Employee ID/ Person ID Based on Country Using a Sequence
2418814 - How to configure an MDF Sequence object and Business Rule to auto-generate Person ID during Hire
Keywords
Custom MDF, External Code, Auto-Generate, Auto-generation, auto generation, mdf, object, manage data, generate, sequence , KBA , LOD-SF-EC-FOO , Foundation Objects (Organisation, Pay and Job Structures) , LOD-SF-MDF-OBJ , Object Definition & Field Related Issues , LOD-SF-MDF-RUL , Custom Oject based Business Rules , How To