I'm adding options dynamically. I have a option set field that have no items. I'm using javascript to add options on the form onload event. This is the option set (I added two items to show what the values look like):
This is the code that I'm using to create my option object:
var num1 = Number(451330000) + Number(_facs_userid_value);
console.log(num1);
formContext.getControl("facs_worker1").addOption(setOptionAttributes("Supervisor, Sam", num1));
function setOptionAttributes(optionText, optionVal){
var option = {text:optionText, value:optionVal};
return option;
}
This is the option value in my picklist:
This is my error:
I'm adding the correct publisher prefix, so I'm not sure why I'm still getting this error.