How To Update Custom Fields on Activity to Same Custom Fields Added in Leads Object (Doc ID 2216854.1)

Last updated on JUNE 22, 2017

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.1.11.1.0 to 11.1.11.1.0 [Release 1.0]
Information in this document applies to any platform.

Goal

Written the following script to trigger an update on the Activity for the Custom Next Step fields on an Activity to the corresponding Next Step fields on a Lead.

Using below script user do not see any error but the fields are not updated why? Same filed name is used on both objects.

def NxtStp = NextStep_c
def Owner = OwnerId
//throw new oracle.jbo.ValidationException('Account is: ' +Owner);
//throw new oracle.jbo.ValidationException('Account is: ' +NxtStp);
if (isAttributeChanged('NextStep_c')){
def vo = newView('Lead')
def vc = newViewCriteria(vo)
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('Owner')
//throw new oracle.jbo.ValidationException('Account is: ' +Owner);
vci1.setOperator('=')
  vci1.setValue(Owner)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
  throw new oracle.jbo.ValidationException('Account is: ' +NxtStp);

setAttribute ("NextStep_c" , NxtStp)
}
 

 

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