setting value using dotwalking

Community Alums
Not applicable

Hi Team,

 

I have written a before BR script to set boolean value but its not setting it,but on checking the logs , it does show the value is set however when we open the record, we do not see the value.

  var exp = new GlideRecord('sn_ind_tmt_orm_order_line_item');
    exp.addQuery('sys_id', current.order_line_item.toString());
    exp.query();
    if (exp.next()) {
        gs.info('Got the Exp:'+exp.order.u_expedite);
        exp.order.u_expedite = true;
        gs.info('Expedite is:'+exp.order.u_expedite);
      

    }
 
Please let me know what is the issue or what might be the issue of if anything wrong in my way?
9 REPLIES 9

Shubham Singh
Mega Guru

Hi @Community Alums 

 

Try to set the value with the quotation as:

exp.order.u_expedite = 'true';

 

Thanks!

 

Mark it as correct and helpful if it works 🙂

Luxo Nadappan
Tera Guru

hi, 

 

hi ,

Seems exp.update(); is missing

 

Regards,

Luxo

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Community Alums ,

 

Can u try below code:

 

var exp = new GlideRecord('sn_ind_tmt_orm_order_line_item');
    exp.addQuery('sys_id', current.order_line_item.toString());
    exp.query();
    if (exp.next()) {
        gs.info('Got the Exp:'+exp.order.u_expedite);
        exp.order.u_expedite = 'true';
        gs.info('Expedite is:'+exp.order.u_expedite);
exp.setWorkflow(false);
      exp.update();
exp.setWorkflow(true);
    }

 

Thanks,

Danish

 

Community Alums
Not applicable

Not working.