How can i create two VRA records at a time .

sushma9
Tera Contributor

Hi Team,

 I have requirement  where i need to create the two VRA records  and the vra record will be created when i clicked on the  Create VRA  UI Action . as of now when i am clicking on the UI Action Only one VRA record is creating and i need to create two VRA records at a time . How can i achieve this .

1 ACCEPTED SOLUTION

Hi @sushma9 ,

 

If u want to create two records then u can apply for loop here n check. Something like this

for (var i=0;i<2;i++){
if(i=1){
gr.short_description = 'test2';
}else{
gr.short_description = 'test1';
}
}

 

Thanks,

Danish

 

View solution in original post

16 REPLIES 16

Any Query business rules?

 

@Danish Bhairag2 

 There is no Query Br . I am not sure i am getting the issue and i tried with different possibility but no luck . So i tried with the below script in the back ground  script i am able to see it now but when i try for the new assessment i am still  getting the same error .

 

script :

var gr = new GlideRecord('sn_vdr_risk_asmt_assessment');
gr.addQuery('sys_id of the record');
gr.query();
while(gr.next()){
gr.questionnaire_due_date = "2023-11-26 15:30:32";
gr.setWorkflow(false);
gr.update();
} .