Custom Message for Duplicate Business Key

Dear Support Team,

Can I customize message for duplicate business key?


Here in this process I have set business key on name attribute in master entity.

When I enter duplicate value in name field in the form it produces an error as expected.

But from the error message how an end user can identify that the business (unique) key is set on name field.


Chetan Sindhi

Comments (3)


Dear Chetan,

In order to display a correct message to end users, you require to create an expression to validate if the user has entered repeated value. Please follow these steps:

1. Create an expression using the function: CHelper.getEntityAttrib("Entity","ValueToReturn","filter","") to obtain values according the filter. For further information:

2. After you have validated this information, you need to set a message to end user with the following function: CHelper.ThrowValidationError("sMessage") For further information:

3. Finally, you can create traces to review your expression. To do this, use this function: CHelper.trace("FileName","Trace text" + Attribute/Variable) For further information:

Use the latest article as an example to follow as you need.




Dear Juan,

I would really like to thank and appreciate your prompt reply.

I have already applied a similar solution using expression and it is working successfully without any error.

However, assume when we have thousands of records in our master entity containing a business key and we try to insert a record which doesn't contain a duplicate value for business key then also it will perform as many comparisons as the number of records in the master entity. So the complexity order of this approach when we try to insert a record in a master entity containing a business key will be o(n), where n is the number of records. It would have been better if it can be done using the back-end exception handling or if we could configure an error message in the window where we define a business key.


Dear Chetan,

Currently our product does not include this feature. We invite you to use our feedback platform on the ideas space to post your request.

This platform will allow you to share your ideas so that the whole Bizagi BPM Suite community can vote and discuss them. We want to make sure we solve the needs of our clients, so that we can add the features you consider most important.