SCTask Attachment Mandtory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 02:15 AM
Hi Team ,
My Requirement is to make attachment mandatory for SCTASK based Following conditions. Please let me know how to achieve this using the OOB configuration .
- It should a ( LAPTOP ) catalog item .
- Short description contains keywords ( Access Request )
- When the SCTASK state moves to closed complete .
Thanks in Adavance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 02:21 AM
Hi @nameisnani
Please refer below community post.
Making an attachment mandatory in a catalog task
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Mayur Shardul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 05:54 AM
Hi @nameisnani,
You can write Before update Business rule with all the condition you want and then in advanced you can add the below script,
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
if (current.hasAttachments() != true) {
gs.addErrorMessage('Attachment is mandatory');
current.setAbortAction(true);
} else {
gs.addInfoMessage('There is attachment');
}
})(current, previous);
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Thank You
Swathi Sarang
Hope this solves your question. if it does, please mark my response helpful and solution accepted.
Thank you
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 05:56 AM
Hi @nameisnani,
You can write Before update Business rule with all the condition you want and then in advanced you can add the below script,
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
if (current.hasAttachments() != true) {
gs.addErrorMessage('Attachment is mandatory');
current.setAbortAction(true);
} else {
gs.addInfoMessage('There is attachment');
}
})(current, previous);
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Thank You
Swathi Sarang
Hope this solves your question. if it does, please mark my response helpful and solution accepted.
Thank you
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 05:59 AM - edited 10-13-2023 06:09 AM
Hi @nameisnani,
You can write Before update Business rule on sc_task table with all the condition you want and then in advanced you can add the below script,
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
if (current.hasAttachments() != true) {
gs.addErrorMessage('Attachment is mandatory');
current.setAbortAction(true);
}
})(current, previous);
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Thank You
Swathi Sarang