Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to make end user upload mandatory attachments on ESC portal and restrict visibility

Deepak Shaerma
Kilo Sage
Kilo Sage

Hi everyone,

 

I have a requirement where, once the first Catalog Task (SCTask) is closed, the end user should be prompted to upload three mandatory attachments (for example: PAN, Aadhaar, and ID Proof) directly on the ESC portal.

 

After the user uploads these attachments, they should only be visible to one specific group in the next Catalog Task, not to any other users or groups.

 

Has anyone implemented something similar?

How can I achieve this on the portal?

 

Any guidance or best practices would be greatly appreciated.

 

Thanks in advance!

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepak Shaerma 

this is very specific requirement.

you will require a custom solution for this.

When should the mandatory attachment check happen? example during RITM update etc?

Also where do you require this ESC Ticket Page?

💡 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

VikMach
Mega Sage

@Deepak Shaerma, 1) Once the task is closed user should be prompted to upload mandatory docs... meaning, SCTask is already closed. There must be one action on the form to trigger the next action. You cannot have a message show up on the screen out of the blue. If an event ends then you don't have anything left in the form or server side to trigger the next action. (If that is what you mean???)


To trigger the next action and achieve the message popup on screen, you can utilize the state change to "Closed Complete"with OnChange client script that will bring up the popup modal like example below.

Example: I have created a Demo UI Page and called that into modal with OnChange client script to show the message and redirect link. Here user can read the message and follow the direction. Catalog form hyperlink will guide the user to new browser window and submit button will then save the SCTask. User also has option to cancel just in case they forget to perform any activity on the form.

 

VikMach_1-1761500900741.png



2) To make the attachment visible only to a particular group, you can create one "read or AllowIf" ACL which will check the attachment table for the specific SysID of next Catalog Task that was submitted with the documents. In the advanced script section you can write your code to check if the user "isMemberOf" (Example syntax : gs.getUser().isMemberOf()) that specific group then return true else return false.

Hope that helps.
Let me know if that worked.

Regards,
Vikas K