- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 01:26 AM - edited 04-16-2024 09:16 PM
Hi All,
I am having an attachment in record producer in scoped application. It should not allow more than 1 attachment on submit. Below is the code. But the rowcount is always showing as 0. Please help here
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 01:54 AM
Hi Renu,
Check this blog form Ankur that shows how to validate Attachments on catalog items, same would work for Record producer as well.
Verify Mandatory Attachments Count on Catalog Item - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:44 PM
Hi @Ankur Bawiskar i have debugged now and am able to make it work with the link that Anurag mentioned . Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 08:08 PM
i added the script and i noticed it is not working well in native Ui
it is popping up a message mentioning native ui wont allow window, length, span
i made isolate script as false
Please let me know how this can be resolved
else{ // native view var length = $j("li.attachment_list_items").find("span").length; if(length != countRequired){ alert('You must add 2 attachments before submitting this request.'); return false; } }