How to PreDefault (Lead / Opportunity) Name Field with LeadNumber / OptyNumber respectively using Groovy Script

(Doc ID 2106553.1)

Last updated on FEBRUARY 15, 2016

Applies to:

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


We are trying to PreDefault - pre-populate the OOTB Lead / Opportunity Name fields with the LeadNumber / OptyNumber respectively.
We have wrote the following groovyScript() on BeforeInsert.

Trigger: BeforeInsert
TriggerName: PopulateLeadID_BI

//Auto-Populate Name with LeadNumber
setAttribute('Name', LeadNumber);

Trigger: BeforeInsert
TriggerName: PopulateOpptyID_BI

//Auto-Populate Name with OptyNumber
setAttribute('Name', OptyNumber;

However when we click Create - the Name field is not pre-populated with LeadNumber / OptyNumber.

Could you please advise how we can pre-default the OOTB Name field on Lead / Opportunity.


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