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 11.1.10.0.0 and later
Information in this document applies to any platform.

Goal

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.

Lead:
Trigger: BeforeInsert
TriggerName: PopulateLeadID_BI

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

Opportunity:
Trigger: BeforeInsert
TriggerName: PopulateOpptyID_BI

groovyScript:
//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.
 

Solution

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