CX Sales Mobile - Programmatic Assignment of Lookup Fields Not Behaving Like Manual Selection
I have a script running on the On Create event of the Opportunity object. My goal is to automatically populate the Owner field (PartyName1
) with the resource who is creating the opportunity.
According to the documentation, I understand that I should first query the resources
object like this:
const resourceQuery = query('resources'); resourceQuery.setParameters('PartyId', userPrefProvider.getPartyId()); const resourceResponse = resourceQuery.execute();
With this, I'm able to retrieve the resource's data.
To populate the field, I'm using the setColumn()
function. However, the field still appears as empty, even though the value seems to be set. For example, I’ve tried the following lines: