Regarding onsumbit client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2023 11:18 PM
Code for and what UI type should i need to create an on-behalf leave I must add an attachment (any type of file is valid, encrypted or not encrypted). and I try to create an on-behalf leave without an attachment I can't submit the request and the following message appears:
- "Uploading supporting document is mandatory"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 11:09 PM
Hello @Apoorva A H
create a on display business rule that will setup a scratchpad variable
(function executeRule(current, previous /*null when async*/) {
g_scratchpad.hasAttachments = current.hasAttachments();
})(current, previous);
Now, You have to call the scratchpad variable into the client script :-
function onSubmit(){
if (!g_scratchpad.hasAttachments)
{
alert('Upload Supporting document is mandatory');
}
}
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 07:36 AM
