Adding Revenue Owner To The Opty Sales Team

(Doc ID 2398801.1)

Last updated on MAY 15, 2018

Applies to:

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

Goal

On : 11.13.18.02.0 version, Opportunities

Adding revenue owner to the opty sales team

The groovy script we created under opportunity revenue to add the opportunity revenue owner to the opportunity sales team is not working and it is making the create opportunity screen become blank.
The groovy script used is:
def alreadyInTeam = false
def optyTeam = Opportunity?.OpportunityResource;

while(optyTeam.hasNext()) {
  def row = optyTeam.next()
  if(row.ResourceId == ResourcePartyId) {
  alreadyInTeam = true
  }
}

if(alreadyInTeam == false) {
  def addRess = optyTeam.createRow();
  addRess.setAttribute('ResourceId',ResourcePartyId);
  addRess.setAttribute('LockAssignmentFlag','N');
  addRess.setAttribute('AccessLevelCode','300');
  optyTeam.insertRow(addRess);
  
  //SendNotificationEmail();
}

What groovy script we should use to achieve this requirement?
 

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