Impossible To Query A Record With Groovy Script With A Criteria On Dynamic Choice Field (Doc ID 1568277.1)

Last updated on MARCH 17, 2017

Applies to:

Oracle Fusion CRM Application Composer Cloud Service - Version 11.1.5.0.0 and later
Oracle Fusion CRM Application Composer - Version 11.1.5.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.1.5.0.0 version, Application Common

ACTUAL BEHAVIOR
---------------
When trying to query in groovy script to read a specific record where the criteria is a dynamic choice list, it returns all fields.

EXPECTED BEHAVIOR
-----------------------
Expected that the criteria returns only certain records filtered.

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
The following code was tested where Period_c is a DCL field created in EmployeeStaffing custom object. 

Example of groovy script with period criteria
println('[SetMonthAssignment-After Update] - Start')


def PeriodVal= 'P-000000000010'
def vo = newView('EmployeeStaffing_c')
def vc = vo.createViewCriteria()
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('Period_c')
vci1.setOperator('=')
vci1.setValue(PeriodVal)
vc.insertRow(vcr)
// 6. Apply the view criteria to the view object
vo.appendViewCriteria(vc)
// 7. Execute the query
vo.executeQuery()
println('[SetMonthAssignment-After Update] - ExecuteQuery')

while (vo.hasNext()) {
def LineX = vo.next()
println('[SetMonthAssignment-After Update] - HasNext : ' + LineX.Id + '/' + nvl(LineX.Period_c,'NOVAL'))
println('[SetMonthAssignment-After Update] - HasNext2 : ' + LineX.Employee_c + '/' + nvl(LineX.PeriodYear_c,'NOVAL') + '/' + nvl(LineX.PeriodType_c,'NOVAL'))
}
println('[SetMonthAssignment-After Update] - End')

Result in Application composer RunTime Messages view shows that system returns all records

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot search for specific records using DCL field

Cause

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