New button on Catalog task Related list on RITM form

Anubhav24
Mega Sage
Mega Sage
Hi All,
 
I had implemented one logic to hide/show "New" button on the sc catalog task related list displayed on the RITM form in the Omit new condition script tab:
 
gs.addInfoMessage('here 1');
if (parent.cat_item == "791d2a7ff70b2010ec1ceeb74851e0ce" && parent.u_template) {
    var codeList = gs.getProperty('new_button_tasks').split(',');
    if (codeList.indexOf(parent.u_template.getDisplayValue()) > -1) {
        answer = false;
    } else
        answer = true;
} else
    answer = true;
 
I had implemented this in San Diego version with the old UI and it was working fine for admin and users with itil and sn_request_read and write roles.
After upgrade to Utah , if I write some info messages they are validated for admin users and if I impersonate with a user having itil and sn_request_read and write roles , the condition is not getting even evaluated no log messages shown on the form.
 
Thanks
5 REPLIES 5

Voona Rohila
Kilo Patron
Kilo Patron

HI @Anubhav24 

Check which roles is the New Button Visible to.

VoonaRohila_0-1687173513071.png

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Hi @Voona Rohila ,

There are no roles added to New Roles field , it is empty in my case.

Hi @Anubhav24 

check if user has create access to that table?


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Hi @Voona Rohila ,

Thanks a lot for your quick responses.

I figured it out , it is due to the "*" ACL on sc_task table , that has been modified as part of UTAH upgrade.