- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2019 11:37 PM
Hello Guys,
I have a task to perform ,
In incident form, attachment must be mandatory on submit.
If there is no attachment then a error msg ("Plz add an attachment")..
This attachment should be stored in sys_attachment table after submittion.
Plz help .
Solved! Go to Solution.
- Labels:
-
Field Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2019 12:15 AM
Hello Naveen
You need to use hasAttachments and I guess you are using hasAttachment. You missed s at the last
Later I have modified the code and may be thats why its not woking. Check out the udpated code:
(function executeRule(current, previous /*null when async*/) {
gs.addInfoMessage("Result:"+current.hasAttachments());
if(current.hasAttachments() != true){
gs.addInfoMessage("PLease add an attachment");
current.setAbortAction(true);
}
})(current, previous);
Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2025 02:28 AM