current.variables.variable_name does not work on sn_vdr_risk_asmt_vendor_engagement table

HN1
Tera Contributor

I created a new Record Producer on sn_vdr_risk_asmt_vendor_engagement table in GRC:Vendor Risk Management
after the record created Im trying to get the variables values by simply using current.variables.variable_name but always getting this message:

com.glide.script.RhinoEcmaError: Cannot read property "name" from undefined
sys_script.2e771f3f471721106ee5afb8036d43de.script : Line(5) column(0)
2:
3: // Add your code here
4:
==> 5: gs.info('Haim- - - ' + current.variables.name);
6:
7: })(current, previous);

6 REPLIES 6

Karan Chhabra6
Mega Sage
Mega Sage

Hi @HN1 ,

 

Instead of using current.variables.name, you can just use producer.<variable_name>, for example:

producer.name;

 

If my answer has helped with your question, please mark it as correct and helpful

 

Thanks!

Im trying to reach the variables values with business rule after creation and not from the producer script

If your Business Rule is running against the "sn_vdr_risk_asmt_vendor_engagement" table and your variables/fields are on the "sn_vdr_risk_asmt_vendor_engagement" table you can access them by using the following: 

 

current.name;

 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Hi Steven,

 

I need the variable not the field value.