View All Accounts In Groovy Script
Last updated on FEBRUARY 25, 2017
Applies to:Oracle Fusion Sales Cloud Service - Version 220.127.116.11.0 to 18.104.22.168.0 [Release 1.0]
Information in this document applies to any platform.
On : 22.214.171.124.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.
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?
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