The CreatorCon Call for Content is officially open! Get started here.

How to find --Active, inactive records in incident table

Kishore8
Kilo Guru

function onAfter(current, previous)

{

var inc = new GlideRecord('incident');

inc.addInActiveQuery();

inc.query();

  while(inc.next())

  {

  inc.short_description='welcome' ;

  inc.update();

  }

}

i have tried this ...not working.......

8 REPLIES 8

JusCuz
Tera Guru

I actually have not played with addActiveQuery() much....



I usually just use inc.addQuery('active',true) --or false whichever you are looking for.


thanks,,


sorry to say this, ...but this not working......


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

You spelled it wrong. One uppercase to much..



should be like this: inc.addInactiveQuery();



with a lower case "a" in "Inactive"



http://wiki.servicenow.com/index.php?title=GlideRecord#addInactiveQuery&gsc.tab=0



//Göran


it is not working......can you plse give clear view about this....