Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

setting value using dotwalking

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

Not applicable

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

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

 

Not applicable

Not working.