Add owner`s Manager to activity team Using Groovy (Doc ID 2242556.1)

Last updated on MARCH 10, 2017

Applies to:

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

Goal

I try to add appointment owner's manager use groovy, I created an after create trigger, the groovy script as below:

println('Activity AfterCreate start')
def userid = OwnerId
while(userid != null)
{
def vo = newView('Resource')
def vc = newViewCriteria(vo)
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('PartyId')
vci1.setOperator('=')
vci1.setValue(userid)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
vo.reset()
def vofirst = vo.first()
userid = vofirst.ManagerPartyId
if(userid != null)
  {
  println(userid)
  def an = ActivityAssignee
  def newitem = an.createRow()
  newitem.setAttribute('AssigneeId',userid)
  newitem.setAttribute('PrimaryAssigneeFlag','N')
  an.insertRow(newitem)
  }
}
println('Activity AfterCreate end')

it works properly on SUI, but it seems not work on Mobile UI..
 

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