UiPath Integrations

Quickstart

This guide shows you how to build a project that validates the connection to your Microsoft 365 Dynamics account. To validate your connection, you'll build an automation sequence using each of the Microsoft Dynamics 365 activities to do the following:

Prerequisites

Before you build your project:

  • Install UiPath Studio version 2018.3 or later (if you do not have it installed).

Steps

Create a new project

  1. Open UiPath Studio.
  2. Under New Project, click Process to create a new project (this opens a New Blank Process window).
  1. Enter a project Name, Location, and Description.
  2. Click Create.

You're done! Next, follow the steps below to add the Microsoft Dynamics 365 Activities Package to your project via Manage Packages.

Add the Microsoft Dynamics 365 Activities Package

  1. In your new project, click Design at the top of the page.
  2. Click Manage Packages (this opens the Manage Packages window).
  1. Under All Packages, click Go!.
  2. Search for "Dynamics365" (the search results automatically return as you type).
  3. Click UiPath.MicrosoftDynamics365.Activities in the results panel (this opens the package details panel in the right-hand side of the window).
  4. Click Install.
  5. Click Save (this opens a License Acceptance window).
  1. Click I Accept in the License Acceptance window.

You're done! The Microsoft Dynamics 365 Activities package is now in your Activities > Available > Integrations > Microsoft > Dynamics 365.

Now, let's build your first Microsoft Dynamics 365 automation project.

Build a Microsoft Dynamics 365 automation project

Microsoft Dynamics 365 Scope

  1. In the Activities panel, go to Available > Integrations > Microsoft > Dynamics 365.
  2. Click, drag, and drop the Microsoft Dynamics 365 Scope into the main Designer panel.
  3. In the Designer panel, click the Microsoft Office 365 Scope activity to open its Properties panel.
  1. Enter the URL, Username, and Password to your Microsoft Dynamics 365 platform.
    • The entered username must be associated with a user that has the security roles needed to edit records.
    • For more information, see the Microsoft Security roles and privileges documentation.
  2. In the Design panel, click the Connect button inside the Microsoft Office 365 Scope activity.
    • This opens a connection to your Microsoft Dynamics 365 platform. Once connected, your platform's records and fields are added as available property values for subsequent Microsoft Dynamics 365 activities.
    • After a successful connection, the button changes to Reconnect (you don't need to click the button when it says Reconnect).

Important

Before editing a project that includes the MicrosoftDynamics365Scope activity, you must click the Connect button when it is shown.

If the Reconnect button is shown, no action is required.

Create Record

  1. In the Activities panel, go to Available > Integrations > Microsoft > Dynamics 365 > Create Record.
  2. Click, drag, and drop the Create Record activity into the Microsoft Dynamics 365 Scope > Do sequence.
  3. In the Designer panel, click the Create Record activity to open its Properties panel.
  1. In the Create Record activity, click the EntityName drop-down arrow.
  2. Scroll down the drop-down list and select Opportunity.
  1. Click the Fields button (this opens the Parameters wizard).
  2. Select and enter a Value for each following Name (formatted according to the Type):
    • Budget Amount (e.g., 1000)
      • You'll Change this value during the Update Record activity later in this guide.
    • Topic (e.g., "Dynamics365Setup")

Retrieve Records

  1. In the Activities panel, go to Available > Integrations > Microsoft > Dynamics 365 > Retrieve Records.
  2. Click, drag, and drop the Retrieve Records activity after the Create Record activity in the Do sequence.
  3. In the Designer panel, click the Retrieve Records activity to open its Properties panel.
  1. In the Retrieve Records activity, click the EntityName drop-down arrow.
  2. Scroll down the drop-down list and select Opportunity.
  1. Click the Search Parameters button (this opens the SearchParameters wizard).

Note

When using the Retrieve Records activity, you can use either the SearchParameters or the SearchXML query files property to define your search parameters (not both).

For more information, see Input Properties in the Retrieve Records activity details.

  1. Select Topic and add the Value you used during the Create Record activity (e.g., "Dynamics365Setup").

  2. Click OK.

  1. Before adding a value for the Records output property, create a new variable. To create a variable, click the Variables tab below the Designer panel.
  2. Enter a Name for your variable (e.g., retrievedRecord).
  3. In the Variable type drop-down, select ArrayOf<t>(this opens the Select Types window).
  1. Select Browse for Types... click OK (this opens the Browse and Select a .Net Type window)
  1. Search for CrmEntity (the results automatically return as you type).
  2. Select CrmEntity from the search results.
  3. Click OK.
  1. In the Properties panel of the Retrieve Records activity, enter your Records variable (e.g., retrievedRecord).

Update Record

  1. In the Activities panel, go to Available > Integrations > Microsoft > Dynamics 365 > Update Record.
  2. Click, drag, and drop the Update Record activity after the Retrieve Records activity in the Do sequence.
  3. In the Designer panel, click the Update Record activity to open its Properties panel.
  1. In the Update Record activity, click the EntityName drop-down arrow.
  2. Scroll down the drop-down list and select Opportunity.
  1. Click the Field drop-down arrow.
  2. Scroll down the drop-down list and select Budget Amount.
    • Only one field change is allowed per Update Record activity use. If you want to change more than one field in a single record, you must use the Update Record activity for each change.
    • Fore more information, see the Update Record activity details.
  1. Enter a Value for the Budget Amount field that is different from the one used during the Create Record activity (e.g., 5000)
  2. In the Properties panel, Record property, enter the Retrieve Records output variables.(e.g., retrievedRecord(0)).
    • You must convert the variable to a non-array CrmEntity by appending "(#)" after the variable (e.g., recordRecord(0)). The "(#)" specifies which CrmEntity in the array to use (e.g., (0) uses the first item in the array).

Change Opportunity Status

  1. In the Activities panel, go to Available > Integrations > Microsoft > Dynamics 365 > Change Opportunity Status.
  2. Click, drag, and drop the Change Opportunity Status activity after the Update Record activity in the Do sequence.
  3. In the Designer panel, click the Change Opportunity Status activity to open its Properties panel.
  1. In the Change Opportunity Status activity Status drop-down list, select Won.
  2. In the Properties panel, enter the Record input property variable from the previous Update Record activity (e.g., retrievedRecord(0)).

You're done! Now that you have built your automation project, let's run it to see if it works

Run

  1. In the Design Ribbon, click Run.

Note

As the first automation run (against this registered application), you will be prompted to consent to the application's delegated permissions.

For more information, see Azure Active Directory consent framework in the Microsoft Azure documentation.

For an example of the consent experience, see Consent experience - an example in the Microsoft Azure documentation.

  1. To verify the run result, go to the Microsoft Dynamics 365 platform you used in the Microsoft Dynamics 365 Scope activity and do the following:
    1. Find the Opportunity Topic you created in the Create Record (e.g., Dyanmics365Setup)
    2. Verify the Opportunity Budget Amount is equal to the value you entered in the Update Record activity (e.g., 5000).
    3. Verify the Opportunity Status is equal to Won.

You're done! Now that you validated your Microsoft Dynamics 365 connection, you can continue building more automation projects.

Updated a day ago


Quickstart


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.