- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Hello Everyone,
In this video, I will cover scenario-based solutions which our implementations might require in various projects.
I have explained how to Make Attachments Mandatory in Incident using Business Rules...
==========================BUSINESS RULES============================
Table - Incident
When to Run - Before Insert
Script -
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var incAtt = new GlideRecord('sys_attachment');
incAtt.addQuery('table_sys_id', current.sys_id);
incAtt.query();
if (!incAtt.hasNext()) {
gs.addErrorMessage('Please add attachment while creating an incident!!!');
current.setAbortAction(true);
}
})(current, previous);
If my video/content helped you in any way, please mark this video/content as BOOKMARK, SUBSCRIBE & HELPFUL
Best Regards,
Prashant Kumar (LearnIT)
YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant
Blog LearnIT: https://medium.com/@LearnITbyPrashant
Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/
ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635
- 1,382 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.