That is going to be a fairly complicated technical article overlaying tips on how to create the customized workflow step required to e-mail all particular person customers in a staff. That is helpful for help desks or conditions the place you’ll be able to’t or don’t wish to immediately e-mail the staff.

I’ll attempt my greatest to simplify this matter sufficient in order that a person with little to no prior expertise ought to have the ability to observe it, nonetheless, in case you simply have to implement the performance shortly and don’t thoughts paying for it I consider there are some firms or options on-line which can do that.

In the event you’re simply wanting the code itself then take a look at my GitHub undertaking – https://github.com/ShaunWilkinson/CreateActivityPartyFromString

Necessities

Earlier than we get began you will have no less than the next –

Create the Customized Workflow Step

On this stage, I’m engaged on the idea that you’ve got Visible Studio put in, the most recent CRM SDK Instruments and administrator permissions. In the event you don’t I’m positive there are many guides on-line that may help but when not remark under and I’ll make some.

  1. Open Visible Studio, develop the File tab > New > Undertaking.
  2. Within the window that opens develop Visible C# > Workflow and choose ‘Exercise Library’.
  3. Give the undertaking a reputation in my case I’ll simply name it “EmailTeam” and alter the Framework to be ‘.NET Framework 4.5.2’.
  4. Click on OK and the undertaking needs to be created.
  5. On the right-hand aspect, you need to see the Resolution Explorer window. Proper-click ‘Activity1.xaml’ and choose ‘Delete’. We gained’t be needing this.
  6. Now right-click the ‘References’ entry within the Resolution Explorer and choose ‘Add Reference…’.
    emailTeamMembers2
  7. A window will pop up, click on ‘Browse…’ on the bottom-right.
  8. In the event you downloaded the CRM SDK Instruments utilizing the hyperlink I supplied then you’ll be able to navigate to ‘C:Dynamics Dev ToolsToolsPackageDeployment’ and choose the information listed under, in any other case, find the information under wherever you’ve downloaded the SDK.
    • Microsoft.Crm.Sdk.Proxy.dll
    • Microsoft.Xrm.Sdk.dll
    • microsoft.xrm.sdk.workflow.dll
  9. Click on Okay then OK within the window to import the dll information.
  10. As soon as that’s performed, right-click the title of your undertaking good of the small inexperienced c# brand within the Resolution Explorer, then click on Add then Class.
  11. Give it a descriptive title comparable to ‘CreateActivityPartyFromTeam’ then click on Add.
  12. You’ll now have a Class file which we are able to add some code into. I’ll cowl that within the part under.

The Code

Now we’re going to populate the category file after which construct the undertaking, as a result of formatting restrictions in WordPress I’m simply going to hyperlink you to the code on GitHub, you’ll want to observe the directions under fairly than simply copying and pasting all of it in any other case you’ll run into points.

  1. Open the hyperlink under containing all of my code –
  2. Copy your entire file and paste it into your class in Visible Studio.
  3. Initially, you’re going to see lots of errors and it’s simple to suppose you’ve performed one thing mistaken however it’s simply because we haven’t but added any References that are self-contained modules of code which we use (on this case it’s the CRM SDK).
  4. Proper-Click on ‘References’ within the Resolution Explorer on the fitting and choose ‘Add references’.
  5. Within the window that seems go to the Browse web page in case you’re not on it already then click on ‘Browse’ on the backside proper.
  6. Navigate to the CRM SDK that you simply downloaded and go into the ‘CoreTools’ folder.
  7. Choose the next information then click on Add –
    • Microsoft.Crm.Sdk.Proxy.dll
    • Microsoft.Crm.Sdk.dll
  8. Click on OK within the Reference Supervisor window. Many of the errors will disappear however we’re nonetheless lacking a reference.
  9. Proper-Click on References once more after which choose ‘Handle Nuget Packages’.
  10. Do a seek for ‘Microsoft.Crmsdk.workflow’ and set up the most recent secure model that’s supported by your CRM. In my case, that is 8.2.0.2 on the time of writing.
  11. Click on OK to any warnings.
  12. All going effectively you need to now haven’t any errors in any respect displaying in Visible Studio.

Signing the Undertaking

To ensure that the code to execute in CRM we have to signal it, which we do by making a certificates. Fortunately that is very simple to do in Visible Studio.

  1. Proper-Click on the title of the undertaking within the Resolution Explorer on the right-hand aspect and choose Properties.
    emailTeamMembers8
  2. Within the left-hand navigation click on ‘Signing’.
  3. Examine ‘Signal the meeting’
  4. Click on the empty drop-down after which choose ‘<New>’ which is able to permit us to create a certificates.
  5. I’d recommend filling within the values much like the picture under, be certain your password is memorable and safe.
    emailTeamMembers9
  6. Click on OK and the certificates shall be created.

Construct the Undertaking

  1. Save the undertaking then click on the ‘Construct’ choice within the menu on the high and click on ‘Construct Resolution’.
  2. All going effectively you will note one thing alongside the strains of the textual content under within the Output window. If not you will have to both google the error it exhibits or feedback under and I’ll attempt to assist.
    emailTeamMembers5
  3. Copy the deal with proven proper of the ‘EmailTeam -> ‘ textual content within the Output window as much as the final backslash ().
  4. Open a file explorer in your laptop and paste it into the deal with bar on the high then hit enter in your keyboard to go to that location.
  5. You need to be seeing 5 information in case you’re in the fitting location. Crucial one being known as * nameOfYourProject*.dll, in my case it’s known as EmailTeam.dll.

Registering your Customized Workflow Step

So by this level, you’ve created the undertaking containing all of the required code and also you’ve constructed the .dll file that we’ll use with a software known as the ‘PluginRegistration’ software that may be discovered within the CRM SDK folder. This can register the plugin with CRM and permit us to make use of it in workflows and the likes in CRM.

  1. To begin, entry the ‘Plugin Registration’ folder positioned within the CRM SDK folder.
  2. Then run the ‘PluginRegistration.exe’ file.
  3. As soon as this system opens you’ll have to click on ‘Create new connection’ at which level you’ll have to fill within the particulars to hook up with your deployment. In my case, I’m going to hook up with an Web-facing on-premise deployment so my particulars are as under –
    emailTeamMembers6
  4. Click on Login, and you need to see an inventory of registered plugins & customized workflow steps.
  5. Click on ‘Register’ then ‘Register new Meeting’.
  6. The ‘Register New Meeting’ window will now open, we’ll wish to set it up as follows in most circumstances –
    • Step 1 – Choose the .dll file we created in one of many earlier phases
    • Step 2 – No change, depart all chosen
    • Stage 3 – Examine ‘Sandbox’ if not already checked
    • Step 4 – Choose ‘Database’ if not already checked
  7. Lastly, click on ‘Register Chosen Plugin’.
  8. All going effectively you’re going to get a popup much like under –
    emailTeamMembers10
  9. The plugin is now registered with CRM and can be utilized in workflows as a customized step.
  10. From right here you’ll be able to then make use of the method in a workflow

Utilizing the Course of

This course of can be utilized by making a workflow after which including a ‘Create Electronic mail step, making certain that you simply don’t add a worth within the To discipline.

  1. Click on ‘Add Step’ after which scroll down and choose ‘CreateActivityParty (1.0.0.2)’ or comparable.
  2. Then choose ‘CreateActivityParty.CreateActivityPartyFromTeam’ which is able to permit us to generate an exercise occasion (what goes within the To discipline of an e-mail) after which ship the e-mail to all people in a staff.
  3. In Group enter a hyperlink to a sound staff, usually I do that personally by having populated an ‘Proprietor (Group)’ discipline on the document the workflow is related to, this might be a case or something with an proprietor.
  4. Enter a hyperlink to the associated e-mail document you created within the earlier step after which click on ‘Save and Shut’
  5. As soon as the workflow runs it ought to then dynamically populate who the e-mail is shipped to primarily based on the person staff members.

LEAVE A REPLY

Please enter your comment!
Please enter your name here