- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2020 02:32 AM
when a user enter a short description which is already exists,then form submission should aborted.
i am using on submit client script and glide ajax.
all i want to cancel sumission on the basis of result from script include.
how is it possible plz suggest
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2020 04:39 AM
Hi,
If you used same then you should mark my response as correct.
But anyway what important here is solution to your query and you got that.
Thanks,
Dhananjay.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2020 08:22 PM
Hi Amit,
Any Update on these?
Please mark if above post helps you in any way to solve your problem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2020 10:56 PM
thanks for suggestion i used sync to achive the result
thank for supporting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2020 10:02 PM
Hi,
In addition to above and Priya mentioned if you use asynchronous call in onSubmit client script. Client script does not wait for response from server it submits the form. Still you want this in onSubmit client script you can use synchronous call.
Find below code.
onSubmit client script -
function onSubmit() {
var userVal=g_form.getValue('short_description');
var ga = new GlideAjax('checkShortDescriptionSI') ;
ga.addParam('sysparm_name','checkShortDesc');
ga.addParam('sysparm_user_name',userVal);
ga.getXMLWait();
var value1=ga.getAnswer();
if(value1=='true')
{
return false;
}
else{
return true;
}
}
script include code-
script include name - checkShortDescriptionSI
client callable - true/checked
var checkShortDescriptionSI = Class.create();
checkShortDescriptionSI.prototype = Object.extendsObject(AbstractAjaxProcessor, {
checkShortDesc: function() {
var gr=new GlideRecord("incident");
gr.addQuery("short_description",this.getParameter('sysparm_user_name'));
gr.query();
if(gr.next())
{
return true;
}
else{
return false;
}
}
});
Mark correct and helpful based on impact.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2020 10:54 PM
thank i achieved that with same kind of appoach by synchronous instead of async.
thank u for your suggestion

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2020 11:09 PM
Hi,
Glad you got your answer, May I know which script did you used?
Thanks,
Dhananjay.