My Oracle Support Banner

The SalesOrderHeader Object Does Not Return Values (Doc ID 2644817.1)

Last updated on MARCH 10, 2020

Applies to:

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

Goal

On : 11.13.20.01.0 version, CX Integration

The SalesOrderHeader Object Does Not Return Values

Expected Behavior :
if the advanced expression returns true, the layout should be displayed else the layout should not be displayed.

Actual Behavior: For some users the layout is being displayed when it should not.


Advanced expression used to display Button:
def vo1 = newView('CommonLookup');
def vc1 = newViewCriteria(vo1);
def vcr1 = vc1.createRow();
def vci1 = vcr1.ensureCriteriaItem('LookupType');
vci1.setOperator('=');
vci1.setValue("CPQ_STATUS");
vc1.add(vcr1);
vo1.appendViewCriteria(vc1);
vo1.executeQuery();
def LookupCodesList1 = []
while (vo1.hasNext())
{
  def row1 = vo1.next()
  def get2=row1.getAttribute("LookupCode");
  get2=get2.toUpperCase()
  LookupCodesList1.add(get2)
}
def vo = newView('SalesOrderHeader')
def vc = vo.createViewCriteria()
def vcr = vc.createRow()
def vci = vcr.ensureCriteriaItem('OptyNumber')
vci.setOperator('=')
vci.setValue(OptyNumber)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
def count = 0
while(vo.hasNext()){
count++
def CO = vo.next()
def AF = CO.getAttribute('ActiveVersionFlag')
def status = CO.getAttribute('Status')

if(!(status.toUpperCase() in LookupCodesList1) && AF == 'Y' )
 return true
}


if(count == 0)
  return true
 

Solution

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
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.