Chetan Mahajan
Mega Sage

Hello @Community Alums ,

                                     You can use as below 

var gr = new GlideRecord('core_company');
gr.addQuery('sys_id','74638e021b720890e0e2fff7dc4bcb2d'); // you can remove this line or you can use any filter condtion if you want
gr.query();
while(gr.next()){
    var gr1 = new GlideRecord('sn_vdr_risk_asmt_assessment');
    gr1.addQuery('sys_id', gr.getUniqueValue() ); // beleiving this is refering to gr 
    gr1.query();
    if(gr1.next()){
        gr.u_rating_valid_to = gr1.risk_rating_valid_to;
        gr.update();
    }

}

 

Kindly mark correct and helpful if applicable