web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

Shared Variables between plugins of different entities

(0) ShareShare
ReportReport
Posted on by

We have a plugin on contact and acocunt that in certain situations will disassociate a relation.

However in the PreOperation we want to do soem extra checks depending on the origin of the disassociate call.

I tries to add a SharedVariable that in can read in the Disassociate plugin, but I don't succeed.
As it is between two different entities I know it is not possible to add a variable to the context, but I used the "tag" in the Request.
However still no luck with that.

reference to try with tag:

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/org-service/use-messages#add-a-shared-variable-from-the-organization-service

https://www.itaintboring.com/dynamics-crm/shared-variables-in-dataverse-plugins-surprise-surprise/

Anyone an idea how I can pass some information?

My code

            Relationship relationship = new Relationship(relationshipname);
            DisassociateRequest request = new DisassociateRequest()
            {
                RelatedEntities = collection,
                Relationship = new Relationship(relationshipname),
                Target = new EntityReference(entityName, id),
            };
            request["tag"] = tag;
            this.OrganizationService.Execute(request);

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi binu_pa,

    Maybe you can  Disassociate records through power automate:

    (+) Associate or Disassociate Records for 1:N or N:N Relationship using Power Automate Relate Action CDS - Microsoft Dynamics CRM Community

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
NeerajPawar Profile Picture

NeerajPawar 31

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 23 Super User 2026 Season 1

#3
Encore Business Solutions Profile Picture

Encore Business Sol... 14

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans