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

Set default value of record type field on oracle sales mobile app

Summary:

We need to set a value as default LOV on a record type field based on role. We have written a script for on create as we need to default it during creation but that does not work as expected.

Code Snippet (add any code snippets that support your topic, if applicable):

const Row = getCurrentRow();
const userPref = getUserPreferences();
const isSalesUser = userPref.isRoleAssigned('ABC_SALES_USERS');
if (isSalesUser===true)
{
  Row.setColumn("OpportunityRecordType_c",'STANDARD_OPPORTUNITY');
}
else
{
  Row.setColumn("OpportunityRecordType_c",'DFS_OPPORTUNITY');
}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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