Issue in Attachment Table SysID

Subashree KR
Tera Contributor

While submitting a catalog item, I'm working on restricting the attachment type. If the attachment type is not .xlsx, we shouldn't be able to submit the request. I created a script include to get the attachment filename. But it's not working. The reason behind is sys_id of the attachment doesn't match.

 

SubashreeKR_0-1742466300983.png

The attachment is stored in Sys Attachment table. But I'm not sure of the Table Sys Id. It's not the catalog item sys_id.

SubashreeKR_1-1742466428816.png

Can someone please help me to get the Table sys Id? So, I can use this 'Table sys_id' to get the Attachment record using Glide Record.

 

1 ACCEPTED SOLUTION

@Subashree KR 

you will have to use DOM manipulation etc to get the file names which I won't recommend.

I believe I have answered your question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

7 REPLIES 7

@Ankur Bawiskar - Thanks for the suggestion. Instead of using the variable, Is there a way to restrict the file using OOB Add attachment icon. 

SubashreeKR_1-1742472716736.png

 

 

@Subashree KR 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Subashree KR 

you will have to use DOM manipulation etc to get the file names which I won't recommend.

I believe I have answered your question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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