Set Dynamic Choice List in Groovy

(Doc ID 2082373.1)

Last updated on JULY 28, 2017

Applies to:

Oracle Fusion Sales - Version and later
Oracle Fusion Sales Cloud Service - Version and later
Information in this document applies to any platform.


On : version, Leads, Sales Campaigns

Set Dynamic Choice List in Groovy

I've defined a Custom Object in the Sales Application called Campaign.
I've created a Custom Field Record Owner of type Choice List to link with a Resource.
I try to set the default for this field via Groovy Script to a specific user. According to the documentation I understood that I can set the field RecordOwner_Id_c with the resource id, but this doesn't work and I get an error message (Invalid value for dynamic choice list). My code is the following, used within a Server Script of the custom object with trigger 'Create':

def resourceRowId = 300000001359369
setAttribute('RecordOwner_Id_c', resourceRowId)

In the end I need to get the ResourceProfileId within the Groovy Script

Invalid value for dynamic choice list


1. Put the script in a Trigger
2. Execute the trigger
3. Error Appears


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms