My Oracle Support Banner

How to copy value from Contacts custom field to custom field in Lead on creation (Doc ID 2809025.1)

Last updated on SEPTEMBER 22, 2021

Applies to:

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


In the Lead object creating a trigger to obtain the value of a custom field (Category_c) of the Contact object, according to the contact selected in the created lead.
Using different triggers at the object level and at the field level, but can't get a result from the query though value of the Category_c field contains a value.
Created the following object function:

def var_ObjView = newView('PersonProfile')
def view_criteria = newViewCriteria(var_ObjView)
def row_searchValue = view_criteria.createRow()
def criteria = row_searchValue.ensureCriteriaItem('PartyUniqueName')
def Categoria = var_ObjView.first()?.Categoria_c;
setAttribute('Categoria_c', Categoria);
throw new oracle.jbo.ValidationException("CategCliente: "+ Categoria);

Calling the Object Function from the following triggers and the result is as described:
 -Create: Returns null value
 -Before update: Returns null on the creation page and on the edit page after making a change, it returns a value.
 -AfterFieldChanged Field Primary ContactID: Returns Null value

The desired behavior is to obtain the queried value of the Category_c field from the moment the lead was created. How can I obtain this value from the creation of the lead?


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.