Validating that a document is attached with the Approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 12:15 PM
I would like an approver to attach a document with their approval. If they hit 'Approve' without the attachment present, then it should prompt a message to add the attachment. I also need this to work only when the 'ask for approval' is invoked from a particular flow (e.g., Process Shop Request). I am thinking this might be a business rule or client script, but not sure the best approach. Any thoughts are appreciated 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 08:03 AM
@JVOGEL11 : May be the below reference link might help you.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0723548
Kindly modify according to your context such as table name, state change validation etc.
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 09:37 AM
Sujatha - thank you. The script might solve half my problem. I am thinking of applying this to the table: sysapproval_approver (during the approval with the approver). However, I dont need to have the script applied to every approval, just those where the approval applies to specific type of service catalog item category and flow. I don't see any fields in the sysapproval_approver where I can identify what category condition the UI script can be applied. What would the script look like to check the item category that is related to this specific approval? Would I be able to dot-walk in some way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:45 AM
@JVOGEL11 : If I had understood it, you have a approval record as below and the field "document_id" references to the RITM record which inturn holds the field "Item" details.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 08:40 AM
Hello,
You can create onsubmit client script and use GlideSysAttachment API to check existence of attachments on specific record.