Sql4Cds icon indicating copy to clipboard operation
Sql4Cds copied to clipboard

[Feature Request] : Support delete on principalobjectaccess

Open sybaris opened this issue 5 months ago • 0 comments

Hi,

First, Thanks for you wonderfull tool. I used it very often... Something that could be usefull for me it's to be able to delete/update principalobjectaccess. image

Here some C# code to do the delete :

  var entity = ...Get record from principalobjectaccess...
  var revokeAccessRequest = new RevokeAccessRequest
  {
      Revokee = new EntityReference(entity.GetAttributeValue<string>("principaltypecode"), entity.GetAttributeValue<Guid>("principalid")),
      Target = new EntityReference(entity.GetAttributeValue<string>("objecttypecode"), entity.GetAttributeValue<Guid>("objectid")),
  };

  serviceClient.Execute(revokeAccessRequest);

Regards Sybaris

sybaris avatar Jan 23 '24 07:01 sybaris