Issue with the OnSubmit client script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 06:34 AM
Hi All,
I have the below OnSubmit client script written for making attachments as mandatory
Script ::
function onSubmit() {
if(this.document.getElementsByClassName('get-attachment').length == 0 && g_form.getValue('do_you_have_a_copy_of_the_rfx')=="Yes" ) {
alert('Please attach the copy of the RFX.');
return false;
}
}
The script is working in the main form but it is giving me the error on the main RITM , whenever I click on the ""Cancel Request"
Error :
How can I fix this issue ?
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 07:22 AM
@Pooja Khatri This is what i tried on my PDI and its working fine.
try to add , if (window == null ) condition
If still its not working, just for testing add this catalog client script for different catalog item to test it and disable the old one.
Thanks,
Harsh