To trigger a notification without entering the record in the table

himani14
Kilo Explorer

Hi

I want to trigger a notification to a user onSubmit of Client Script if form is not submitted and record is not created successfully. This i have to do on Catalog Item. 

Kindly help.

Thanks

Himani Goyal

5 REPLIES 5

Khushboo Kanouj
Mega Expert

Hi Himani,

 

Use the below script include (client callable checked)

 

var eventTrigger = Class.create();
eventTrigger.prototype = Object.extendsObject(AbstractAjaxProcessor, {
notify : function()
{
gs.log('inside','KK');
gs.eventQueue('catalog.item.trigger',current,null,null);
},
type: 'eventTrigger'
});

 

and below on submit catalog client script:

 

var ga = new GlideAjax('eventTrigger');
ga.addParam('sysparm_name','notify');
ga.getXML(HelloWorldParse);
return false;
}
function HelloWorldParse()
{
alert('Mail has been sent');

}

 

It do triggered the notification created on catalog item table.

 

Regards,

Khushboo