How to Expose Account Industry In Contacts Landing Page?
(Doc ID 2491835.1)
Last updated on NOVEMBER 15, 2019
Applies to:
Oracle Fusion Sales Cloud Service - Version 11.13.18.05.0 and laterInformation in this document applies to any platform.
Goal
On : 11.13.18.05.0 version, Accounts, Contacts, Households
Expose Account Industry in Contacts Landing Page
We are trying to expose the Account's Industry in the Contacts object.
Account's Industry is not a standard field in Contacts object and I cannot create a join field in Contacts object.
So I thought to create a custom formula text field (Acc Industry).
I tried the following script but I don't get correct results:
======================
if (PrimaryCustomerId == null || PrimaryCustomerId =="") return null;
def account = newView('OrganizationProfile');
def vc = account.createViewCriteria();
def vcr = vc.createRow();
def vci1 = vcr.ensureCriteriaItem('PartyId');
vci1.setOperator('=');
vci1.setValue(PrimaryCustomerId);
vc.insertRow(vcr);
account.appendViewCriteria(vc);
account.executeQuery();
if(account.hasNext()){
def accRecords1 = account?.next();
def accIndustry=accRecords1?. PartyClassification;
return accIndustry;
}
=====================
The results I get are:
Acc Industry=
oracle.jbo.server.ViewRowSetImpl@2aa39581
I have tried before a similar approach to expose the Account's Registry ID in Contacts with success with the below script creating a custom formula text field (Acc Registry ID)
=====================
if (PrimaryCustomerId == null || PrimaryCustomerId =="") return null;
def account = newView('OrganizationProfile');
def vc = account.createViewCriteria();
def vcr = vc.createRow();
def vci1 = vcr.ensureCriteriaItem('PartyId');
vci1.setOperator('=');
vci1.setValue(PrimaryCustomerId);
vc.insertRow(vcr);
account.appendViewCriteria(vc);
account.executeQuery();
if(account.hasNext()){
def accRecords1 = account?.next();
def accID=accRecords1?.PartyNumber;
return accID;
}
=====================
The classification category we use is not the OOTB one (CLASSIFICATION_CATEGORY=CUSTOMER_CATEGORY), but a custom one.
Solution
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
Goal |
Solution |
References |