My Oracle Support Banner

Set Dynamic Choice List in Groovy (Doc ID 2082373.1)

Last updated on DECEMBER 22, 2020

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


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.