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 11.13.21.04.0 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;
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