Partner Contact: Unable to default custom field to value 'Partner', using Groovy (Doc ID 2156235.1)

Last updated on JULY 07, 2016

Applies to:

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

Goal

In Partners -> Contacts sub-tab -> there is a custom FCL field named Contact Record Type, with two values:

1. End Customer Contact
2. Partner

This field is displayed only on Details layout.

Customer's requirement is that whenever they are creating a partner contact, the value of the FCL field should be defaulted to "Partner".

In order to achieve the requirement, they have created a Before Insert in Database Object Trigger in Contact Object, but so far no joy:

def partyUsages = PartyUsageAssignment;
def PartnerFlag = ''
while (partyUsages.hasNext())
{
 def partyUsg = partyUsages.next();
 if(partyUsg?.PartyUsageName=='Partner' && PartnerFlag!='Y')
 {
  setAttribute('ContactRecordType_c','AVY_PARTNER');
 }
}
 

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