Jason
Jason

Reputation: 179

CRM Access Team Plug-in

I have a requirement for sending an email when a user is added to an access team regarding an opportunity, but can't for the life of me get my plugin to attach to the right message. I have so far tried using:

Associate - None
AddMembers - Team
AddUserToRecordTeam - TeamTemplate

GrantAccess - Opportunity

Any help would be appreciated

Thanks

Upvotes: 1

Views: 1345

Answers (2)

Alex
Alex

Reputation: 23300

Access Teams have two messages:

  • AddUserToRecordTeam - User is added to an Access Team
  • RemoveUserFromRecordTeam - User is removed

TeamTemplate entity, Server-only

I suggest profiling and debugging to make sure your code isn't indeed firing but dong nothing.

MSDN has a long list of all messages of all entities

AddMembers for Team won't work because that's for Owner Teams, not Access Teams.

GrantAccess won't work either because that's fired on Sharing.

Upvotes: 1

mike9182
mike9182

Reputation: 450

Users and Teams have an N:N relationship in Dynamics CRM. This means that there is an intermediary entity as shown below. The type for this entity can be found by going to Settings=>Customizations=>Customize The System=>Entities=>Team=>N:N Relationships=>teammembership_association. Here it can be seen that the relationship entity name in this case is "teammembership".

Structure for N:N relationship: systemuser N:1 teammembership N:1 Team

Knowing this, I would try registering a plugin on create of teammembership.

Upvotes: 1

Related Questions