How to throw validation notification on Fields residing in Form Header - CloudFronts

How to throw validation notification on Fields residing in Form Header

Hi All,

Have you tried setting Field level notification on the Form Header of the Record?

Let’s consider an example,

We have an Estimated Revenue field which should never be set a $0.00. Therefore, we must throw a notification error based on this validation.

The formula for setting field level notification is generalized as follows,

formContext.getControl(fieldname).setNotification(errormessage);

Now let’s see how this general formula changes based on the field’s location set on the Form.

  • If Field is located on the Form

Formula will be:

formContext.getControl(fieldname).setNotification(errormessage);
  • If Field is located on the Form Header

Formula will be:

formContext.getControl(“header_”+fieldname).setNotification(errormessage);
  • If Field is located on the Form Business Process Flow (BPF)

Formula will be:

formContext.getControl(“header_process_”+fieldname).setNotification(errormessage);

Hope this helps!!


Share Story :

Secured By miniOrange