How to pass this value from UI action to script include?

omsa
Tera Contributor

Hi , 

 

I want to pass these values in the below format from ui action to script include. how can i do that?

var body = {
"accountId": "12345678",
"roleName": "prbgca3-elkuw1_business",
"minutes": "1"
};

 

This is what i've created in UI action and it is not working. 

 

var accountID =g_form.getValue('variables.v_a_account');//getting variable from ritm
var role = g_form.getValue('variables.v_role');//getting variable from ritm
var minute = 1;
 
var body = {
    "accountId": accountID,
    "roleName": role,
    "minutes": minute
};
alert('body is : '+body);
1 REPLY 1

Shruti
Mega Sage
Mega Sage
var body = {
    "accountId": accountID.toString(),
    "roleName": role.toString(),
    "minutes": minute.toString()
};
Script include->  new ScriptIncludeName().functionName(JSON.stringify(body));