My Oracle Support Banner

Is There A Way To Inactivate/delete An Account Through Groovy (Doc ID 2569157.1)

Last updated on DECEMBER 22, 2020

Applies to:

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

Goal

On : 11.13.19.04.0 version, Accounts, Contacts, Households

How to inactivate/delete an Account through groovy?

Trying to inactive a Sales Account through groovy in the Activity object.
Know that once you delete an account via the UI it will set the Account 'PartyStatus' field to I (inactive).
Trying to set the status field via groovy: OrganizationDVOVA?.setAttribute('PartyStatus','I')
but error is thrown:
Exception in expression "oracle.apps.crmCommon.activities.publicModel.activityManagement.entity.ActivityEO" trigger "ChangeAprovalState" : oracle.jbo.ReadOnlyAttrException Attribute PartyStatus in view object ActivityVO_OrganizationDVOVA_ActivityVOToOrganizationVO_OrganizationDVO cannot be set.
at "oracle.apps.crmCommon.activities.publicModel.activityManagement.entity.ActivityEO" trigger "ChangeAprovalState" line 99

Same code in account object: setAttribute('PartyStatus','I') throws the same error
Upon checking the field in account object, seems is not updatable.
As alternative solution changing the atribute 'SalesProfileStatus' was tried: OrganizationDVOVA?.setAttribute('SalesProfileStatus','INACTIVE')
It changed successfully but this will not inactivate the account

How to find out whether it might be possible to inactivate/delete an account through groovy?
 

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


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.