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);

  • Community Member Profile Picture
    on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 58 Most Valuable Professional

#2
Travis South Profile Picture

Travis South 37

#3
11manish Profile Picture

11manish 24 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans