My Oracle Support Banner

Industry Filed Is Not Required (Doc ID 2374698.1)

Last updated on MARCH 21, 2018

Applies to:

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

Goal

On : 11.13.17.11.0 version, Accounts, Contacts, Households

Industry filed is not required

In R12, we made our industry field on the account object required, by adding a groovy script in BEFORE INSERT trigger.
We recently upgraded to R13, and the script is not working as intended anymore.

Our script:

def vo = newView('CodeAssignment')
  def vc = vo.createViewCriteria()
  def vcr = vc.createRow()
  def vci1 = vcr.ensureCriteriaItem('OwnerTableId');
  vci1.setOperator('=')
  vci1.setValue(PartyId)

  def vci2 = vcr.ensureCriteriaItem('OwnerTableName')
  vci2.setOperator('=')
  vci2.setValue('HZ_PARTIES')

  def vci3 = vcr.ensureCriteriaItem('ClassCategory')
  vci3.setOperator('=')
  vci3.setValue('DNVGL_INDUSTRIES')

  vc.insertRow(vcr)
  vo.appendViewCriteria(vc)
  vo.executeQuery()
  if(vo?.first() == null){
  throw new oracle.jbo.ValidationException('Industry is required for new Accounts')
  }

and as you can see, vci3.setValue('DNVGL_INDUSTRIES'), DNVGL_INDUSTRIES is added to the classification group.

The script is always returning the validation error, it seems like the query is not able to find the industry at all.


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!


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