- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 02:47 AM
To make attachment mandatory on Native View of catalog item.
Got a related post for the same , It suggest for DOM manipulation . Can somebody please tell if using DOM manipulation will not impact anything later ?
https://community.servicenow.com/community?id=community_blog&sys_id=00edd9751bb090d0ada243f6fe4bcba8&feedbackAction=comment
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 02:59 AM
Hi,
this script in onSubmit would work fine for Native
function onSubmit(){
var count = getCurrentAttachmentNumber();
if(count == 0){
alert('Please add at least 1 file');
return false;
}
}
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
04-25-2022 02:59 AM
Hi,
this script in onSubmit would work fine for Native
function onSubmit(){
var count = getCurrentAttachmentNumber();
if(count == 0){
alert('Please add at least 1 file');
return false;
}
}
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
04-25-2022 03:28 AM
If i want to apply for both Native and portal then can u suggets without DOM manioulation ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 03:37 AM
Hi,
I believe I have answered your original question on making attachment mandatory in native.
If my response helped please mark it correct and close the thread so that it benefits future readers.
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
04-25-2022 04:44 AM
I am using the script you shared in your article.. As its only working fine for me in both ..
As i asked earlier , would it impact anything adversely later ?