UiPath Documentation
activities
latest
false
Wichtig :
Bitte beachten Sie, dass dieser Inhalt teilweise mithilfe von maschineller Übersetzung lokalisiert wurde. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Klassische Integrationsaktivitäten

Schnellstart – Datensätze

Überblick

Der Zweck dieses Handbuchs besteht darin, Sie beim Erstellen eines funktionierenden Beispiels zu unterstützen, das die folgenden Microsoft Dynamics 365-Aktivitäten verwendet:

Mit diesem Arbeitsbeispiel können Sie die Verbindung zu Ihrer Microsoft Dynamics 365-Anwendung schnell überprüfen und sich mit den Eingabe-/Ausgabedatentypen der Aktivität vertraut machen.

Nachdem Sie die Schritte in dieser Anleitung ausgeführt haben, verfügen Sie über eine Automatisierungs-Sequence, die Folgendes ausführt:

  1. Stellt eine Verbindung mit Ihrer Microsoft Dynamics 365-Anwendung her (Get Credential und Microsoft Dynamics Application Scope).
  2. Fügt einen neuen Kontodatensatz ein (Insert Record).
  3. Sucht nach dem eingefügten Kontodatensatz (Search Records).
  4. Aktualisiert das Website-Feld des Kontodatensatzes (Update Record).
  5. Überprüft, ob der Kontodatensatz erfolgreich aktualisiert wurde (Get Record).
  6. Löscht den eingefügten Kontodatensatz (Delete Record).
    Hinweis:

    While there may be more efficient ways of achieving the same result, the goal of this sequence is to demonstrate all of the record activities.

Voraussetzungen

Bevor Sie beginnen:

  1. Schließen Sie die Schritte zum Einrichten von Microsoft Dynamics 365 ab.
  2. Verwenden Sie den Paketmanager , um das Paket Microsoft.Activities.Extensions zu installieren (dies ist für die Aktivität Search Records ).
    Hinweis:

    Diese Anleitung verwendet ClientAnmeldeinformationen als Authentifizierungstyp in der Aktivität Microsoft Dynamics Application Scope . Wenn Sie die Verwendung von PasswordCredentials bevorzugen, können Sie Schritt 1 überspringen (eine Aktivität Get Credential hinzufügen) und die Aufzählungszeichen in Schritt 2 ausführen (die Aktivität Microsoft Dynamics Application Scope hinzufügen).

Schritte

Erstellen Sie Ihr Projekt

  1. Fügen Sie eine Aktivität Get Credential hinzu.
  2. Enter the AssetName for the credential asset you created (during the Setup) for the application Client Secret (e.g., "MicrosoftDynamics365ClientCredentials").
  3. Create and enter a SecureString variable for the Password property (e.g., clientSecret).
  4. Create and enter a String variable for the Username property (e.g, clientId).
  5. Fügen Sie die Aktivität Microsoft Dynamics 365 Application Scope nach der Aktivität Get Credential hinzu.
  6. Klicken Sie auf die Schaltfläche Konfigurieren (dadurch öffnet sich der Verbindungsassistent), wählen Sie Ihren Authentifizierungstyp aus, geben Sie Ihre Anmeldeinformationen ein und klicken Sie auf die Schaltfläche Testverbindung . Weitere Informationen über den Zweck und das Verhalten dieses Assistenten finden Sie im Abschnitt.
    • This step is for design time purposes only. To populate the Microsoft Dynamics Application Scope properties, continue to complete the steps below.
  7. In the AuthenticationType property, select your preferred authentication type.
    • If you select PasswordCredentials, create a String variable for the ClientId (e.g., Name: clientId Default: "56X9aXXX-b5d9-4a90-XXXX-13XX9643XXXX")
  8. In the ClientId property, enter the String variable you created for the Get Credential activity or substep above (e.g., clientId).
  9. In the ClientSecret property, enter the SecureString variable you created for the Get Credential activity (e.g., clientSecret).
    • If you selected PasswordCredentials leave the ClientSecret property empty.
  10. Erstellen und geben Sie in der Eigenschaft EndpunktURL eine String -Variable mit der URL der CRM-Instanz ein, mit der Sie sich verbinden möchten (z. B. Name: endpointURL Standard: "https://uipath.crmcrmdynamics.com/" )
  11. In the TenantId property, create and enter a String variable for the directory (tenant) ID assigned to your Azure Active Directory (ADD) tenant (e.g., Name: tenantId Default: "d8353d2a-b153-4d17-8827-902cXXXXXXX").
    • Wenn Sie KennwortAnmeldeinformationen ausgewählt haben, wählen Sie Ihre Einstellung für die Kennwort- Eingabeaufforderung aus (Optionen).

  12. Fügen Sie die Aktivität Insert Record innerhalb der Aktivität Microsoft Dynamics Application Scope hinzu.
    1. Click the Configure button inside the Insert Record activity (this opens the Object Wizard).

      1. In the Select Entity drop-down list, select Account.

      2. In the accountId field, create and enter a String variable (e.g., accountId).

      3. In the Add Single Field textbox, enter name and click enter.

      4. In the name field, enter an account name (e.g., "Quickstart_Account").

      5. Click the Done button.

    2. Add an Add to dictionary activity after the Insert Record activity.

    3. In the Dictionary property, create and enter a Dictionary<String,String> variable accordingly: Name: queryOption, Default: new Dictionary(Of String, String) (you may use a different Name value, but the Default value is required).

    4. In the Key property, enter "$filter".

    5. In the Value property, enter "name eq 'Quickstart_Account'" (Quickstart_Account is the name of the account you inserted in the steps above. If you entered a different name, use that value instead).

    6. Fügen Sie die Aktivität Search Records nach der Aktivität Add to Dictionary hinzu.

    7. In the Object property, select Account.

    8. In the Query Options property, enter the Dictionary<String,String> variable you created above (e.g., queryOption).

    9. In the Result property, create and enter a DataTable variable (e.g., searchResults).

  13. Add an Assign activity after the Search Records activity.
    1. In the To property, create and enter a String variable (e.g., webURL).
    2. In the Value property, enter the following: searchResults.Rows(0).Item("websiteurl").ToString.
      • Weitere Informationen zu den Spaltennamen für jede Entität finden Sie in der Web API EntityType-Referenz in der Microsoft-Dokumentation.
    3. Add an If activty after the Assign activity.
    4. Erstellen Sie eine String -Variable mit einem Standardwert einer URL (z. B. Name: Website, Standard: www.uipath.com).
    5. In the Condition property, enter the following: webURL = website.
    6. In the Then statement box, add a Write Line activity with the following Text: "Website present".
    7. Fügen Sie im Else- Anweisungsfeld die Aktivität Update Record hinzu.
      1. Click the Configure button inside the Update Record activity (this opens the Object Wizard).
        1. In the Select Entity drop-down list, select Account.

        2. In the accountId field, enter the String variable you created for the Insert Record activity (e.g., accountId).

        3. In the Add Single Field textbox, enter websiteurl and click enter.

        4. In the name field, enter the String variable you created in the step above (e.g., website).

        5. Click the Done button.

Testen Sie Ihr Projekt

  1. Fügen Sie die Get Record nach der Aktivität Update Record hinzu (innerhalb des Else -Anweisungsfelds).

    1. Click the Configure button inside the Get Record activity (this opens the Object Wizard).
      1. In the Select Entity drop-down list, select Account.
      2. In the accountId field, enter the String variable you created for the Insert Record activity (e.g., accountId).
      3. In the Add Single Field textbox, enter websiteurl and click enter.
      4. In the websiteurl field, create and enter a String variable (e.g., websiteVerification).
      5. Click the Done button.
    2. Add an If activity after the Get Record activity (inside the Else statement box).
    3. In the Condition property, enter the following: website = websiteVerification.
    4. In the Then statement box, add a Write Line activity with the following Text: "Website update succeeded!".
    5. In the Then statement box, add a Write Line activity with the following Text: "Website update failed".
  2. Fügen Sie die Aktivität Delete Record außerhalb der ersten If- Aktivität hinzu.

    1. In the Object property, select Account.
    2. In the Id field, enter the String variable you created for the Insert Record activity (e.g., accountId).
    3. In the MicrosoftDynamicsStatus property, create and enter a ResponseStatus variable (e.g., responseStatus).
  3. Add a Write Line activity after the Delete Record activity.

    1. In the Text property, enter the following: "Record deleted: "+responseStatus.Success.ToString.
  4. Click Run and verify the Output window includes the expected write line values.

Alles erledigt!

Weitere Informationen zu Microsoft Dynamics 365-Aktivitäten (einschließlich Beispiele für die Ein- und Ausgabe von Eigenschaften), finden Sie auf der Seite Aktivitäten für eine vollständige Aktivitätsliste und Links zu den Seiten mit Aktivitätsdetails.

  • Überblick
  • Voraussetzungen
  • Schritte
  • Erstellen Sie Ihr Projekt
  • Testen Sie Ihr Projekt

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben