Delete any OrgHas... object

I'm having a requestable ressource in order to remove direct assignments of entitlements in an Org.

In the request I'll provide the UID_Org and the XObjectKey of the entitlement.
Could be and ADSGroup, TSBAccountDef, ...

The problem is that corresponding to the entitlement I have to delete entries in different tables/views.
So I could have a process step for each object type with the corresponding generating condition. But that is quite ugly and needs to keep updated for each new module. (i.e. if Azure AD is added I need to add also the delete for OrgHasAADGroup, ...)

Is there a generic way to do that delete?

I just want to remove the entitlement "<Key><T>xxxxxxxxxxx</T><P>d61153ef-f5e4-4cde-be87-0be66a78bbf1</P></Key>" from the Org yyyyyyyyyy.

  • There is no such generic method. I propose using a script in a process. The script can be generic, taking the UID_Org and the XObjectKey of the entitlement as parameters.

    In the script, you can use the DBObjectKey class to construct a DBObjectKey from the UID_Org, the table name of the entitlements' XObjectKey and the UID of the entitlement, which then can be used to delete the assignment.