
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 09:42 AM
Hi All,
We have requirement to validate attachment on a record producer and below line is returning different value when checked in portal and in mobile.
var attlen = this.document.getElementsByClassName('get-attachment').length;
it is giving 2 if we have only one attachment. Has anyone faced similar issue?
How can i validate in client script?
Any inputs on this would be much appreciated.
Thanks,
Fedrick
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 09:52 AM
Hi,
I have shared blog for this and it works in native + portal
Verify Mandatory Attachments Count on Catalog Item
If my blog helps please mark it helpful and also bookmark it
Sharing additional links as well
Possible Ways for Making an Attachment Mandatory : Service Portal/Native UI
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 09:52 AM
Hi,
I have shared blog for this and it works in native + portal
Verify Mandatory Attachments Count on Catalog Item
If my blog helps please mark it helpful and also bookmark it
Sharing additional links as well
Possible Ways for Making an Attachment Mandatory : Service Portal/Native UI
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2022 11:37 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader