Groovy Script Update To EffectiveDate Causing All Revenue Items EffectiveDate To Also Be Updated

(Doc ID 2128438.1)

Last updated on JUNE 22, 2017

Applies to:

Oracle Fusion Sales - Version to [Release 1.0]
Information in this document applies to any platform.


Groovy Script Update to EffectiveDate Causing All Revenue Items EffectiveDate to also be updated

We added the following groovy script to BeforeInsert and BeforeUpdate to Database for Sales Opportunity Script in Oracle Composer:

/* Set Opportunity Date to greatest Revenue Line Date */
def dtChange = 0;
def opptyDt = getAttribute('EffectiveDate');
def myRevenue = nvl(ChildRevenue,0);
while(myRevenue.hasNext()) {
  def myLine =;
  if(myLine.getAttribute('EffectiveDate') > opptyDt){
  setAttribute('EffectiveDate', opptyDt);

What we are experiencing is that when a user go in and add a revenue item that is > than the Opportunity Effective Date, it updates that Opportunity Effective Date as we want it to, BUT IT ALSO updates every revenue item Effective Date to that same date. Somehow this seems to be happening automatically and we'd like to find out if there is a setting/configuration change to turn this off.


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