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
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.
- Open Visible Studio, develop the File tab > New > Undertaking.
- Within the window that opens develop Visible C# > Workflow and choose ‘Exercise Library’.
- 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’.
- Click on OK and the undertaking needs to be created.
- 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.
- Now right-click the ‘References’ entry within the Resolution Explorer and choose ‘Add Reference…’.
- A window will pop up, click on ‘Browse…’ on the bottom-right.
- 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.
- Click on Okay then OK within the window to import the dll information.
- 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.
- Give it a descriptive title comparable to ‘CreateActivityPartyFromTeam’ then click on Add.
- You’ll now have a Class file which we are able to add some code into. I’ll cowl that within the part under.
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.
- Open the hyperlink under containing all of my code –
- Copy your entire file and paste it into your class in Visible Studio.
- 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).
- Proper-Click on ‘References’ within the Resolution Explorer on the fitting and choose ‘Add references’.
- 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.
- Navigate to the CRM SDK that you simply downloaded and go into the ‘CoreTools’ folder.
- Choose the next information then click on Add –
- Click on OK within the Reference Supervisor window. Many of the errors will disappear however we’re nonetheless lacking a reference.
- Proper-Click on References once more after which choose ‘Handle Nuget Packages’.
- 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 188.8.131.52 on the time of writing.
- Click on OK to any warnings.
- 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.
- Proper-Click on the title of the undertaking within the Resolution Explorer on the right-hand aspect and choose Properties.
- Within the left-hand navigation click on ‘Signing’.
- Examine ‘Signal the meeting’
- Click on the empty drop-down after which choose ‘<New>’ which is able to permit us to create a certificates.
- I’d recommend filling within the values much like the picture under, be certain your password is memorable and safe.
- Click on OK and the certificates shall be created.
Construct the Undertaking
- Save the undertaking then click on the ‘Construct’ choice within the menu on the high and click on ‘Construct Resolution’.
- 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.
- Copy the deal with proven proper of the ‘EmailTeam -> ‘ textual content within the Output window as much as the final backslash ().
- 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.
- 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.
- To begin, entry the ‘Plugin Registration’ folder positioned within the CRM SDK folder.
- Then run the ‘PluginRegistration.exe’ file.
- 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 –
- Click on Login, and you need to see an inventory of registered plugins & customized workflow steps.
- Click on ‘Register’ then ‘Register new Meeting’.
- 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
- Lastly, click on ‘Register Chosen Plugin’.
- All going effectively you’re going to get a popup much like under –
- The plugin is now registered with CRM and can be utilized in workflows as a customized step.
- 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.
- Click on ‘Add Step’ after which scroll down and choose ‘CreateActivityParty (184.108.40.206)’ or comparable.
- 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.
- 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.
- Enter a hyperlink to the associated e-mail document you created within the earlier step after which click on ‘Save and Shut’
- 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.