hide Mandatory checkbox under portal settings using script

ShaziyaS4380655
Tera Contributor

ShaziyaS4380655_0-1761658140617.png

ShaziyaS4380655_2-1761658260189.png

 

  
@Ankur Bawiskar

I have requirement if submitter authoorised selected as No , it should hide attachments , but as it was mandatory on the poratl settings level , how can i hide attachments 

16 REPLIES 16

can u help me with the code if the submitter field is yes then only make attachment mandatory , if no it should not be mandatory

I have written on change client script to show the error message and even if the attachemnts are mandatory it is not throwing an error message , Thanks for the help

@ShaziyaS4380655 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

In the above code method is missing

getSCAttachmentCount()

  

@ShaziyaS4380655 

that's OOTB method coming from platform level and you need not worry.

Is my script working fine for you?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader