Symptom
- The placeholders are not visible when accessing the template via Admin Center > Manage Document Template Mapping.
- An error occurs when uploading a document template via Admin Center > Maintain Onboarding and Offboarding Document Templates:
Error:
ChangeSet index 1 - Cannot invoke "com.successfactors.documentgeneration.app.DocumentGenerationTemplate.setBody(String)" because "mappingInstance" is null
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 Onboarding
Reproducing the Issue
- Navigate to Admin Center > Maintain Onboarding and Offboarding Document Templates
- Select an existing document template and open its mapping.
- Observe that placeholders are not visible when accessing the template via Admin Center > Manage Document Template Mapping.
- Attempt to upload or update the document template.
- Error:
ChangeSet index 1 - Cannot invoke "com.successfactors.documentgeneration.app.DocumentGenerationTemplate.setBody(String)" because "mappingInstance" is null
Cause
- The Object Definition: Document Generation Template (DocumentGenerationTemplate) is configured with Secured = Yes, which restricts access to the underlying mapping instance.
- As a result, the system is unable to retrieve the required object during template processing, leading to a null mappingInstance and triggering the error.
Resolution
- Navigate to Admin Center > Configure Object Definitions.
- Search:
Object Definition: Document Generation Template (DocumentGenerationTemplate) - Click on Take Action > Make Correction
- Under Security, set Secured to "No".
- Save
After updating the configuration, retry accessing the Document Template Mapping and uploading the document template. The placeholders should now be visible, and the error should no longer occur.
Keywords
onboarding, obx, ONB2FormTemplate, ChangeSet index 1, DocumentGenerationTemplate, mappingInstance is null, NullPointerException, ONB2 Document Template, Document Template Mapping, Onboarding Document Template upload error, Manage Document Template Mapping, Maintain Onboarding and Offboarding Document Templates, placeholder not visible , KBA , LOD-SF-OBX-DOC , Generation of Documents using PFS , Problem
Product
Attachments
| object_definition - secured.png |
SAP Knowledge Base Article - Public