Define message text for Primary key error in Mongoose

Hi,

I am in Mongoose in MT Cloud environment.

When I try to add another line to my Form which is violating Primary Key rules, I receive this message:

Please where can I setup text for this message?

  • Step 1: Open the SQL Tables form and navigate to the table you want to create the custom message on. Once you navigate to the table, grab the name of the primary key constraint that is on the table. In my example, I want to apply a custom message on the CP_Customers table. So I will want my message name that I will create match “PK_CP_Customer”:

      

     

    Step 2: Open the Maintain Application Message Objects form. Hit F4 to unfilter the messages. Select the add button from the toolbar to add a new record. Object name will be your constraint name, so in this example I will name it “PK_CP_Customer”:

      

     

    Step 3: Now we will need to create a message number. The Message Num field is a key identifier addressing a translatable string from the ApplicationMessages table. The text for all ObjectMainMessages records is retrieved at runtime from the ApplicationMessages table. To add a message number, right click on the field and click add. This will open the ApplicationMessages table in add mode, add a message number and the text that you want to display on the error message: 

      

    Step 4: Save the record, close the form, and say yes to the prompt when it asks you if you want to return the message you just created.

    Step 5: You will see once you return to the form that it has now populated the Message Num field and the Message text field with the message you created in step 3.

    • Give the message a description.
    • Change the message type to “17”. This is a constraint message used for reporting SQL constraint violations (foreign key, check constraint, unique, etc.).
    • Change the Object type to “0”, which is a table object.
    • Save the record and test:

      

  • Thanks, that is exactly what I needed