Symptom
You have added the standard SingleNotesHistory reuse embedded component to your custom screen. You receive an error when adding more than one note and saving the business object instance.
"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 Cloud for Customer
- SAP Cloud Applications Studio
Reproducing the Issue
Prerequisites:
-
You should have the SingleNotesHistory embedded component added to your screen through the UIDesigner.
- You should have all the necessary configurations performed in the Cloud Applications Studio.
- Go to work centre ABC (ABC represents the work center where the issue is located).
- Go to the view DEF (DEF represents the view where the issue is located).
- Open the Business Object instance 123 (123 represents the ID of the instance where the issue is located).
- Move to the facet GHI (GHI represents the facet name where the SingleNotesHistory component is added).
- Click edit and add a second note to the screen.
- Observe the Error messages shown.
Error message: Text with type X and language X already exists. Failed to create the note!
Cause
This is standard system behaviour, as per your configuration of the TextCollection dependent object in the Custom Business Object. This dependent object has not been set to allow Multiple Texts.
In this way, there are backend validations that will check for the Note Type and the Language of the note entered. If these are the same, the system will not allow another note to be added.
Resolution
You need to set the defined dependent object in your Custom Business Object to allow Multiple Texts.
-
Log into the Cloud Application Studio to the affected tenant.
- Open the Solution XYZ (XYZ represents the solution containing the Custom BO).
- Open the Custom BO XXXX.bo (XXXX.bo represents the Custom BO).
- Observe the ABSL line containing: [DependentObject(TextCollection)] node TextCollection;
- Modify this code line to be: [DependentObject(TextCollection)] [MultipleTexts] node TextCollection;
- Save and Activate.
See Also
See the Cloud Application Studio help documentation: 7.2.2.20 Multiple Texts (Business Object)
Keywords
Multiple Texts, SingleNotesHistory, Error message, Save, Add, Error 'Text with type X and language X already exists. Failed to create the note!' When Adding a Note to a SingleNotesHistory Embedded Component , KBA , error , singlenotehistory , text type , AP-RC-BDS-EXT , ByDesign Studio Extensibility , How To