My Oracle Support Banner

Lead Duplication Production Server Script Error (Doc ID 2359936.1)

Last updated on FEBRUARY 12, 2018

Applies to:

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

Symptoms

On : 11.12.1.0.0 version, Leads, Sales Campaigns

ACTUAL BEHAVIOR
---------------
Lead duplication script provided to me does not work as expected.

As advised, we created two "Before Insert Triggers" as shown below -

Script 1:
**************
def vo = newView('Lead');

def lname = Name
def conemail=PrimaryContactEmailAddress
def conphone=PrimaryPhoneNumber

def vc = newViewCriteria(vo)
def vcr = vc.createRow()
def vci = vcr.ensureCriteriaItem('Name')
vci.setOperator('=')
vci.setValue(Name)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)

def vc2 = newViewCriteria(vo)
def vcr2 = vc2.createRow()
def vci2 = vcr2.ensureCriteriaItem('PrimaryContactEmailAddress')
vci2.setOperator('=')
vci2.setValue(PrimaryContactEmailAddress)
vc2.insertRow(vcr2)
vo.appendViewCriteria(vc2)
vo.executeQuery()
vo.reset()
def count=vo.getEstimatedRowCount()
if(count>0){
throw new oracle.jbo.ValidationException('Enter a different name..')
}
**************

Script 2:
**************
def vo = newView('Lead');

def lname = Name
def conemail=PrimaryContactEmailAddress
def conphone=PrimaryPhoneNumber

def vc = newViewCriteria(vo)
def vcr = vc.createRow()
def vci = vcr.ensureCriteriaItem('Name')
vci.setOperator('=')
vci.setValue(Name)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
def vc3 = newViewCriteria(vo)
def vcr3 = vc3.createRow()
def vci3 = vcr3.ensureCriteriaItem('PrimaryPhoneNumber')
vci3.setOperator('=')
vci3.setValue(PrimaryPhoneNumber)
vc3.insertRow(vcr3)
vo.appendViewCriteria(vc3)
vo.executeQuery()
vo.reset()
def count=vo.getEstimatedRowCount()
if(count>0){
throw new oracle.jbo.ValidationException('Enter a different name..')
}


EXPECTED BEHAVIOR
-----------------------
to work successfully

STEPS
-----------------------
The issue can be reproduced at will with the following steps:


BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot use the duplication scripts.

Changes

 

Cause

To view full details, 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 a vibrant support community of peers and Oracle experts.