2635657 - Error 'Text with type X and language X already exists. Failed to create the note!' When Adding a Note to a SingleNotesHistory Embedded Component

SAP Knowledge Base Article - Public

2635657 - Error 'Text with type X and language X already exists. Failed to create the note!' When Adding a Note to a SingleNotesHistory Embedded Component

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.

Environment

  • SAP Hybris Cloud for Customer
  • SAP Cloud Application 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 Application Studio.
  1. Go to work centre ABC (ABC represents the work centre where the issue is located.)
  2. Go to the view DEF (DEF represents the view where the issue is located.)
  3. Open the Business Object instance 123 (123 represents the ID of the instance where the issue is located).
  4. Move to the facet GHI (GHI represents the facet name where the SingleNotesHistory component is added).
  5. Click edit and add a second note to the screen.
  6. Observe the Error messages shown.

 Error message:  Text with type X and language X already exists. Failed to create the note!

SingleNotesHistory.png

 

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.

  1. Log into the Cloud Application Studio to the affected tenant.
  2. Open the Solution XYZ (XYZ represents the solution containing the Custom BO).
  3. Open the Custom BO XXXX.bo (XXXX.bo represents the Custom BO).
  4. Observe the ABSL line containing: [DependentObject(TextCollection)]  node TextCollection;
  5. Modify this code line to be: [DependentObject(TextCollection)] [MultipleTexts] node TextCollection;
  6. 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 , singlenotehistory , error , text type , AP-RC-BDS-EXT , ByDesign Studio Extensibility , How To

Product

SAP Hybris Cloud for Customer all versions