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.
- SAP Hybris Cloud for Customer
- SAP Cloud Application Studio
Reproducing the Issue
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 Application Studio.
- Go to work centre ABC (ABC represents the work centre 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!
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.
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 the Cloud Application Studio help documentation : 220.127.116.11 Multiple Texts (Business Object)
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 , singlenotehistory , error , text type , AP-RC-BDS-EXT , ByDesign Studio Extensibility , How To