I can use {!status#code}, but not {!status#code#before} or {!status#before#code}. These last two only return the ID, not the integration code for these enumerated values. Any other way to get the integration codes?
Below is a sample code you can use as reference:
/* ||==============================================|| ||Status Name || Code || ID || ||==============================================|| ||Created || created || 110088204 || ||For Approval || forApproval || 110088212 || ||==============================================|| */ status_before_id = {!status#before}; status_before_code = rbv_api.getCodeById("transaction12", "status", status_before_id); if (status_before_code = "forApproval") return "Validation Message Here.";
Kindly let me know if this code works for you.
Thank you very much,
Godfrey
You can use getCodeById API to convert the returned value to a picklist code.
Below is a sample code you can use as reference:
/* ||==============================================|| ||Status Name || Code || ID || ||==============================================|| ||Created || created || 110088204 || ||For Approval || forApproval || 110088212 || ||==============================================|| */ status_before_id = {!status#before}; status_before_code = rbv_api.getCodeById("transaction12", "status", status_before_id); if (status_before_code = "forApproval") return "Validation Message Here.";
Kindly let me know if this code works for you.
Thank you very much,
Godfrey
Works, thanks a lot Godfrey!