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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 55 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 25 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans