I am wanting to create an Alert Box that shows up when a couple conditions are met. The function will fire off when the "Status" field changes. Here is the code I am using:
function setFormAttributes(executionContext) {
var formContext = executionContext.getFormContext();
var lookupField = formContext.getAttribute("new_fieldone").getValue();
var status = formContext.getAttribute("new_status").getValue();
// create alert
if (lookupField == "Bobs-Burgers" && status == "Current") {
alert("Here is the alert));
}
}
It's not working. I think the problem is that the "new_fieldone" is a lookup field, and the "new_status" field is an option set.
Any thoughts on how to get the values from these types of fields?
*This post is locked for comments
I have the same question (0)