GlideAjax query

tanz
Tera Expert

I want to write a client script which will perform some actions (display alert that number or date is empty ) in catalog item when the number and date fields from table xyz .

 

For this GlideAjax script should be written which should check on the records and return some flag if one of fields in empty.

 

i want to know how to achieve this.

var gr = new GlideRecord('xyz');
gr.addQuery('sys_id','IN' ,sysIds); // pass the sysids in the glideajax query param
gr.query();
{ if any one of the number or date is empty 
return which field is empty against which number
}
In client script 
alert those and do some action using glideajax
6 REPLIES 6

Hi @tanz,

 

When and Where should this alert be visible?

And from where do we get the sysIDs, for which records the empty should be checked.

@Rupanjani In list view the alert should be visible, for now I am hardcoding two , three records sysids to test