Display red banner on top of the form with some text

profile
Tera Contributor

Develop a custom checkbox field called “Flag for Review” on Incident. When checked: Show a red banner at the top of the form: "This Incident is flagged for managerial review".

How to show a red banner on the top of incident form when a checkbox has been to checked.

I have tried with UI macros + formatter and Ui policy but not working and also with client script not working.

we should not use addinfomessage() method and can't able to use html directly in client script.

Please, some one help me out.

7 REPLIES 7

Mark Manders
Mega Patron

Why shouldn't you use 'addInfoMessage' (or 'addErrorMessage', for that matter)? Use it and you are done. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Can we use addInfoMessage or addErrorMessage as per the requirement. Since, it need to show on top of the banner of a form.

 

Yes. That will show the message at the top. If you use field message it will show on the field.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Deepak Shaerma
Kilo Sage

Hi @profile 

You have create a new onChange client script, change the field name 

DeepakShaerma_1-1749540877920.png


function onChange(control, oldValue, newValue, isLoading) {
  if (isLoading)
    return;

  g_form.clearMessages();

  if (newValue == 'true' || newValue === true) {
    g_form.addErrorMessage('This Incident is flagged for managerial review');
  }
}

 


Result on check the field :

DeepakShaerma_0-1749540826919.png



Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning ‌‌
Thanks & Regards 
Deepak Sharma