why ans is returning null?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
37m ago
Hi @user_20 ,
GlideAjax will not work with OnSubmit client script. By the time scriptinclude returns record may already submitted. It is the reason.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
27m ago
HI @user_20
The reason GlideAjax isn’t suitable for an onSubmit client script is that the Script Include response may arrive after the record has already been submitted.
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18m ago
Hi @user_20 ,
I check your code and I found 2 issues
1. You can not pass parameter directly sd you have to pass like
ga.addParam('sysparm_short_desc',"Your desc");
2. GlideAjax will not work on OnSubmit Client script.
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
