please help me variables.catalogitemvariable

Not applicable

i want glide sc_task table using catalog item variable in condition but "variables.catalogitem variable name " not working when i am putting "variables.sys_id " then its working any other way we can use instead of sysid-

below is the code please help me-

 

 

var records = new GlideRecord('sc_task');
records.addEncodedQuery('variables.2c91c8f3dbf60210c3a3ea7b039619b5=Inter_unit_transfer^variables.ee00aaf9db05cd9077c60181ca96192e=Non PO');
records.query();
while (records.next()) {
    var inwardEntry = records.variables.asset_comp_material_inward_number.getDisplayValue();
    var invoiceNumber = records.variables.asset_comp_invoice_number;
         
    }    

thank you in advanced

OlaN
Tera Sage

Hi,

That not how use can use the variables on the sc_task record (or any other record either).

The "variables" is related to the current Gliderecord object you are currently working with.

So in this case, you will need to find the correct sc_task record first, then set some values on that record.

Anurag Tripathi
Mega Patron

Hi,

You should be able to identify the Task form the Parent RITM. 

And the parent RITM from the Item its created from.

 

Once you have the task then you can query the variables on it.

 

-Anurag