how to create checkbox on incident table and that checkbox is visible to service desk users

ShubhadaMaske
Tera Contributor

how to create checkbox on incident table and that checkbox is visible to service desk users and after selecting checkbox ....... that checkbox is read only to everyone

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ShubhadaMaske 

 

I will not recommend creating a new field on Incident table, if this field used widely, better to create on task table.  here is example

 

AGLearnNGrow_0-1722342730026.png

 

 

To show and hide you can create ACL.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

AndersBGS
Tera Patron
Tera Patron

Hi @ShubhadaMaske ,

 

  1. Create a checkbox field on the incident table/task table according to @Dr Atul G- LNG  comment. 
  2. Create  a business rule for the checkbox to set it to mandatory:
    (function executeRule(current, previous /*null when async*/) {
        if (current.u_custom_checkbox) {
            current.setReadOnly('u_custom_checkbox', true);
        }
    })(current, previous);
  3. Create a UI Policy to Control Checkbox Visibility
    function onLoad() {
        if (gs.hasRole('service_desk')) {
            g_form.setDisplay('u_custom_checkbox', true);
        } else {
            g_form.setDisplay('u_custom_checkbox', false);
        }
    }

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/