Setting Value Of Parent Object Attribute Value based on validation of Child Object (Doc ID 1963005.1)

Last updated on NOVEMBER 30, 2016

Applies to:

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

Goal

Setting value of parent object attribute value from child object collection

The groovy script is running from a button in parent object context. Tying to update column "Total Records" after reading number of rows in child object.
It is reading number of rows using aggregate function on child collector.

The groovy script is running from a button in parent object context.
Trying to check if a child record exists and if present update a field in parent.

using following code
def CommonChild = nvl(CommonChild_c,-1)
CommonChild.reset()
while (CommonChild.hasNext())
{
OscCommonObject1_c?.setAttribute('Status_c', 'Open') // here we get the error.
}

While validating the code getting below error:
Error: Invalid field names found The following field names were not recognized: CommonChild_c, OscCommonObject1_c

How to meet the requirement with correct script?
 

Solution

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