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 and later
Information in this document applies to any platform.


On : 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');

  def vci2 = vcr.ensureCriteriaItem('OwnerTableName')

  def vci3 = vcr.ensureCriteriaItem('ClassCategory')

  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.


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.