My Oracle Support Banner

Warning(9,9) : Cannot assign value to attribute [XXXXX] in script context: GlobalFunction (Doc ID 2535275.1)

Last updated on DECEMBER 22, 2020

Applies to:

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

Symptoms

On : 11.13.19.01.0 version, Accounts, Contacts, Households

Getting a warning on the set attribute in a global function.

ERROR
-----------------------
Warning(14,3) : Cannot assign value to attribute [OrganizationName] in script context: GlobalFunction

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Sign-on to application
2. Navigate to Configuration > Application Composer
3. Expand Common Setup > Global Functions
4. Select Actions > Add (or the Add a Global Function icon)
5. Enter Function Name = TEST and the following script:
def v = newView('OrganizationProfile')
def vc = newViewCriteria(v)
def vcr = vc.createRow()
def vciName = vcr.ensureCriteriaItem('PartyId')
vciName.setOperator('=')
vciName.setValue(xxxxx)
vc.insertRow(vcr)
v.appendViewCriteria(vc)
v.executeQuery()
if(v.hasNext()) {
  def r = v.next()
  def accoutName = r?.getAttribute('OrganizationName');
  accoutName = accoutName + " UPD"
  r.setAttribute('OrganizationName',accoutName );
}
7. Click the Validate button; seeing and error and a warning:
Error(6,18) : The variable [xxxx] is undeclared.
Warning(14,3) : Cannot assign value to attribute [OrganizationName] in script context: GlobalFunction
8. By correcting the error both mesages go away on the next validate.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users are getting a warning on the set attribute in a global function.

Cause

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
Symptoms
Cause
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.