CX Sales Mobile - Programmatic Assignment of Lookup Fields Not Behaving Like Manual Selection — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

CX Sales Mobile - Programmatic Assignment of Lookup Fields Not Behaving Like Manual Selection

edited Jun 30, 2025 7:46PM in Sales 3 comments

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!