Pages

Tuesday, February 14, 2012

Throw custom error msg on saving record without java customization

There could be scenarios when you want to custom error message based on some condition only while saving record but not while giving values to field.
If it is needed to while entering the values to some fields then this can be achieved using Tabledomain with proper condition and giving msggroup and msgkey values.

There are 2 ways to throw error message while saving the records based on some condition.
  1. Create a new workflow having ur business logic and add the workflow to your application save button using option edit workflow Go buttons for the newly created workflow.
  2. Second way of achieving is using integration framework
    • Create publish channel on the object on which the application is created
    • Create a new processing rule with stop action and give the applicable condition using the Add / Modify condition and then give proper message key value. This message key value should be having message group as iface.
    • Create a rule to skip the record in all conditions so that the interface is used only for throwing the error message
    • Enable the publish channel.
Note: Second option will not work if the Admin mode is turn ON, as in Admin mode all the events will be disabled so the event listener will not work.

No comments:

Post a Comment