gliderecord error

Hafila Hatta
Tera Guru

hi. i keep getting this error in my flow. could anyone help to with this error? not sure if my script is the issue

 

here is my script:

 

var acc_name = fd_data._3__for_each.item.accessory;

var var_count = new GlideRecord('u_inventory_accessories_count');
var_count.addQuery('sys_id', acc_name);
var_count.query();

if (var_count.next()) {
    var result = var_count.getValue('u_current_stock_count');
    var new_result = result - 1;
    return new_result;
}

 

HafilaHatta_0-1741143247315.png

HafilaHatta_1-1741143267391.png

 

1 ACCEPTED SOLUTION

hi. solved this issue. apparently, no issue with the script but the 'look up' action was not returning any result. just had to change the look up condition to sys_id field and it works fine. 

 

thanks for ur help 

View solution in original post

10 REPLIES 10

Hello @Hafila Hatta -

The value you are getting from field is of integer type or string type? I guess it is String type so do parse it as integer and see if it works.
If you are not familiar with parseInt() check this link 

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.