cancel
Showing results for 
Search instead for 
Did you mean: 

Change default error message at runtime

tamir_moshe
Participant
0 Kudos

Hello,

I've created an OnSave validation on sales order that raises an event with message saying "Item is not registered". Can I change this default message at runtime to include more accurate description e.g - "item XXX is not registered" ?

I expect something like:

raise InvalidItem.Create("E","item XXX is not registered");

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Vignesh_Dh
Participant

Hi Tamir,

Message has to be defined as below with parameter to substitute a run time value.

Refer link for more information.

message ReferenceInvalid text "Reference to sales order &1 invalid for &2" : IntegerValue, ESF:AdressType;

Regards,

Vignesh

tamir_moshe
Participant
0 Kudos

Thanks for you reply, it was very helpful