CRM 2011 Custom Workflow Activity - Send Email to Managers
In CRM 2011 (not online), you can create custom workflow activity for things that are not achievable using the OOTB workflow.
In my scenario, I want to send Overdue Case Reminder to group of users (in this case - managers) when a case has reached the Follow Up By date.
If you look at the SystemUser, it has a manager field by default. However, I need to be able to send the email to multiple managers.
My idea is that we create a separate Security Role (e.g. Managers) and put all managers in that role. Then we create a custom workflow activity to get all the users in that role and construct an email to notify them when the case is overdue.
Note: for the CaseLink input, I'm using the CRM 2011 Workflow Utilities to generate the Case Link and put it into the Email Description field.
Hope this helps,
Andreas
In my scenario, I want to send Overdue Case Reminder to group of users (in this case - managers) when a case has reached the Follow Up By date.
If you look at the SystemUser, it has a manager field by default. However, I need to be able to send the email to multiple managers.
My idea is that we create a separate Security Role (e.g. Managers) and put all managers in that role. Then we create a custom workflow activity to get all the users in that role and construct an email to notify them when the case is overdue.
Note: for the CaseLink input, I'm using the CRM 2011 Workflow Utilities to generate the Case Link and put it into the Email Description field.
Hope this helps,
Andreas
Hi Andreas,
ReplyDeleteI'm trying to use your example but I cannot find the reference for ActivityParty. Which assembly I need to add to my solution?
Hi Cleiton,
DeleteActivityParty is just another strongly typed entity like Account, PhoneCall etc.
If you generate your entities class using the crmsvcutil tool, that class will have ActivityParty entity in it :)
Regards,
Andreas
Cool stuff. Just out of curiosity, any reason why you used security roles and not teams?
ReplyDeleteHi.
DeleteThanks. Good question. You can surely go with the Team. I can't really remember why role was chosen instead of team, but I can see nothing wrong either way. In fact I reckon if you can use Team it would be cleaner.
Regards,
Andreas
Does this line of code worked for you [ var activityParty = new List(); //used to add instances]? Please respond
ReplyDeleteSorry please ignore my previous comment, got it now.
ReplyDeleteList = System.Collections.Generic.List<>