Create a Quick Button to Assign Members of a Marketing List in Dynamics 365

Jordan Hohepa, 12 May 2017

Recently one of our clients had a situation with Dynamics 365 Marketing Lists where they wanted the ability to select and then assign Marketing List Members to themselves or to other users. As this functionality is not provided out of the box in Dynamics CRM I attempted a few workarounds before finally discovering a good fix.

For the first workaround, I attempted to remake the query one of the Marketing Lists was based on using Advanced Find. After this I could use the Assign button in the results ribbon to re-assign members of my choice. The problem with this was if the list member query was complex it would be very time consuming to remake.

For the second workaround, I attempted to search for all list members who were connected to a specific marketing list via Advanced Find. With the results page returned I could use the Assign button in the ribbon just like in the previous workaround. This method would only work if the CRM Marketing List was a static list and would not return any results if it was a dynamic list. With this is mind I thought it would be a good idea to create a copy of the dynamic marketing list using out of the box functionality. Doing this would create a static list which would allow me to once again use Advanced Find to assign members. This workaround also ended up being ruled out as it would result in too many unnecessary marketing lists which would clutter the system.

image

So, moving on I started to look at adding a new button to the command bar using the Ribbon Workbench. I thought the best place to add it would be on the associated view of the list member, which in my case was the Lead Entity. After adding a new button to the command bar of the Lead Entity, I saw that it was not added to the lists’ associated view. I found that the command bar buttons of the associated view were related to the ‘listmember’ intersect entity and not the Lead, Account or Contact entities in Dynamics CRM. This was an issue because the entity could not simply be added to a solution, so instead I decided to add the Application ribbon to the solution. I could now add a new custom button, with a display rule which would only show the button when the entity was ‘listmember’.

For this specific example the easiest method to provide functionality would be to re-use the OOTB assign functionality. Doing this however is unsupported so I would recommend writing custom code for the assign functionality instead. After publishing the solution, the newly created button appeared in the command bar of the marketing lists associated member view.

image