I'm trying to match values from shared picklist (integration codes are defined) in two related objects using trigger I'm using following formula: rbv_api.getCodeById("levy_exemption_request", {!R67439733.lsp#code}, {!R67439733.id}); During debug I'm receiving error of value is not being defined: Parsed Formula 001 var rbv_api = new Packages.com.rb.core.services.api.ServerSideAPI(62353474, 62356555); 002 003 rbv_api.getCodeById("levy_exemption_request", MGI, 72535282); Formula return type: Integer or String Error Error "MGI" is not defined. (line #3) in formula: var rbv_api = new Packages.com.rb.core.services.api.ServerSideAPI(62353474, 62356555); rbv_api.getCodeById("levy_exemption_request", MGI, 72535282); Please clarify how to resolve this problem. Besides api.getCodeById, do I need to use other formulas to actually match values from picklist?
Hi Roman,
I believe the second argument is rbv_api.getCodeById needs to be quoted, so it is treated as a string. Otherwise, the debugger thinks you have a local variable called MGI in your JavaScript coed:
rbv_api.getCodeById("levy_exemption_request", "{!R67439733.lsp#code}", {!R67439733.id});
Appreciate your help Kurt!
I tried your suggestion but it did't help.
I modified the formula to following:
var lsp_ler = rbv_api.getCodeById("levy_exemption_request", "lsp", {!id});
var x = rbv_api.setFieldValue("levy_exemption", {!id}, "lsp", lsp_ler);
rbv_api.print(x);
but result is still undefined
Managed to work around problem with setFieldValue = "undefined"
Created a trigger "Update Field Value"
with a simple formula:
return {!R62528901.le_status}
that formula is matching shared picklist value from related objects.
I still don't understand why Rollbase support was not able to provide this solution and need to spend ours looking for solution myself.