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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Plugin on Associate-message not working

(1) ShareShare
ReportReport
Posted on by

Hi,

I wrote a plugin for "Associate" message (for no specified entity) that is supposed to fire every time I add a user to a team. The goal of this was to make users follow the parent record when we add them in Access teams. "AddMember" message name is not being triggered by anything I do in CRM, so I think associate is the way to go..

The plugin will trigger if I go to Settings>Administration>Teams and then open up a team and add a user to it. It will also fire the other way around, if I open up a user and go to related Teams and "Add existing team". 

 The problem is that the plugin will not be triggered when adding users to Access Teams through subgrids. For example on an Opportunity record, the "Sales team" subgrid is set to an Access Team for this entity - and if I add a user here it will not trigger my plugin registered on "Associate" request. I can go to advanced find and browse the same Access Team and trigger it when adding a user to it from its own form, though.

Please if anybody has any more information about this, it would be very much appreciated. The search results on google are not covering this. 

*This post is locked for comments

I have the same question (0)
  • Jose R Profile Picture
    81 on at
    RE: Plugin on Associate-message not working

    In the case of AddMembers message for Team entity I was facing the problem and I was able to solve it by changing to AddMember.  I use the VS CRM explorer and seems that this generates the code with AddMembers, I just had to change it to AddMember in the .crmregister file and in the RegisteredEvents.Add method.

  • Suggested answer
    Alexandre Vidal Profile Picture
    195 on at
    RE: Plugin on Associate-message not working

    Hi Simon,

    I'm not sure if i understood you correctly, but i think your plugin should fire on two events :

    - "AddMembers" of  "team" entity. This one i think will fire when you add members to a team from a team record or from a user record.

    - "AddUserToRecordTeam" of "teamtemplate" entity. This one i know for sure fires when a user is added to an access team from a record entity (e.g: Opportunity or Account).

    So doing this, you will cover all the events where somebody is added to a team, should it be normal "Owner Teams" or "Access Teams".

    Be careful if you're managing the removed users from a team, there will be also 2 messages: RemoveMembers and RemoveUserFromRecordTeam.

    Hope it helps,

    Alelxandre

  • Community Member Profile Picture
    on at
    RE: Plugin on Associate-message not working

    That's what I'm doing in the meanwhile.. But it would be much better if you could catch the user being added to the team when it happens instead of checking all team memberships vs. follow-relationships every time we update the record.. 

  • Community Member Profile Picture
    on at
    RE: Plugin on Associate-message not working

    Can't we use update message instead of associate...

  • Community Member Profile Picture
    on at
    RE: Plugin on Associate-message not working

    Have you got a solution, I am with same kind of problem: associate step is not triggered when adding elements from sub-grids ?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans