View All Accounts In Groovy Script (Doc ID 2230235.1)

Last updated on FEBRUARY 25, 2017

Applies to:

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

Goal

On : 11.1.11.1.0 version, Accounts, Contacts, Households

Need to check before insert any account if the document number (a custom field in Account) is already inserted in OSC.
Customer are having an issue about the Groovy script, because users don't have all accounts visibility (they have a Resource Restricted role assigned), then when they use new newView('OrganizationProfile') to query for Accounts, only the Accounts that they have visibility are queried.
This problem cause a lot of duplicate accounts in OSC.

Example:
Customer is using this script for test:

 def orgVO = newView('OrganizationProfile')
 def LINHAS = orgVO.getEstimatedRowCount()
 throw new oracle.jbo.ValidationException("Number of rows: " + LINHAS)

 

The user that has all roles (MyUser).
SalesRep only see 72 accounts, and the user sees 171105 accounts.

The customer needs to change this visibility by Groovy, so they can query for all Accounts. Is that possible?
 

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