Hi all,
I'm having issues with the set regarding field. I'm using the navigateto javascript method to open a dialogue box for a task activity when updating a case field. The I've console logged the id, Name and entityType and they are all correct but it keeps saying I've got a script error.
My question is: is it possible to update a regarding lookup field? I keep reading that it's not possible?
Below is my code:
function onloadRegarding(executionContext) {
var formContext = executionContext.getFormContext();
var caseIdPassed = formContext.data.attributes.get("case_id").getValue().slice(1,-1);
var caseName = formContext.data.attributes.get("case_name").getValue();
var caseLookup = new Array ();
caseLookup[0] = new Object ();
caseLookup[0].id = caseIdPassed;
caseLookup[0].name = caseName;
caseLookup[0].entityType = 'incident';
formContext.getAttribute("regardingobjectid").setValue(caseLookup);
}
I've tried for the field name both regardingobjectid and just regarding but I keep getting a script error in UI which doesn't tell me anything.
Any help would be greatly appreciated.