UiPath Documentation
activities
latest
false
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Actividades de integraciones clásicas

Última actualización 20 de may. de 2026

Inicio rápido: registros

Información general

El propósito de esta guía es ayudarle a crear una muestra de trabajo que utilice las siguientes actividades de Microsoft Dynamics 365:

Esta muestra funcional le permite verificar rápidamente la conexión a su aplicación Microsoft Dynamics 365 y familiarizarse con los tipos de datos de entrada / salida de la actividad.

Después de completar los pasos de esta guía, tendrá una secuencia de automatización que hará lo siguiente:

  1. Establece una conexión a tu aplicación Microsoft Dynamics 365 (Obtener credencial y Ámbito de aplicación de Microsoft Dynamics).
  2. Inserta un nuevo registro de cuenta (Insertar registro).
  3. Busca el registro de cuenta insertado (Buscar registros).
  4. Actualiza el campo del sitio web del registro de la cuenta (Actualizar registro).
  5. Verifica que el registro de la cuenta se haya actualizado correctamente (Obtener registro).
  6. Elimina el registro de cuenta insertado (Eliminar registro).
    Nota:

    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.

Requisitos previos

Antes de comenzar:

  1. Completa los pasos de configuración de Microsoft Dynamics 365.
  2. Utiliza el Administrador de paquetes para instalar el paquete Microsoft.Activities.Extensions (esto es para la actividad Buscar registros ).
    Nota:

    Esta guía utiliza CredencialesDeCliente como TipoDeAutenticación en la actividad Ámbito de aplicación de Microsoft Dynamics . Si prefieres utilizar PasswordCredentials, puedes omitir el paso 1 (añadir una actividad Obtener credencial ) y seguir los subpasos con viñetas en el paso 2 (añadir la actividad Ámbito de aplicación de Microsoft Dynamics ).

Pasos

Construya su proyecto

  1. Añade una actividad Obtener credencial .
  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. Añade la actividad Ámbito de aplicación de Microsoft Dynamics 365 después de la actividad Obtener credencial .
  6. Haz clic en el botón Configurar (esto abre el Asistente de conexión), selecciona tu TipoDeAutenticación, introduce tus credenciales y haz clic en el botón Probar conexión . Para obtener más información sobre el propósito y el comportamiento de este asistente, consulta la sección.
    • 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. En la propiedad EndpointUrl , cree e introduzca una variable String con la URL de la instancia de CRM a la que desea conectarse (por ejemplo, Nombre: endpointURL Predeterminado: "https://uipath.crm4.dynamics.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").
    • Si seleccionaste PasswordCredentials, selecciona tu preferencia de solicitud de contraseña (opciones).

  12. Añade la actividad Insertar registro dentro de la actividad Ámbito de aplicación de Microsoft Dynamics .
    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. Añade la actividad Buscar registros después de la actividad Añadir al diccionario .

    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.
    3. Add an If activty after the Assign activity.
    4. Crea una variable String con un valor predeterminado de una URL (por ejemplo, Nombre: sitio web, Predeterminado: "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. En el cuadro de instrucción Else , añade la actividad Actualizar registro .
      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.

Pruebe su proyecto

  1. Añade la actividad Obtener registro después de la actividad Actualizar registro (dentro del cuadro de instrucción Else ).

    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. Añade la actividad Eliminar registro fuera de la primera actividad Si .

    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.

¡Ya está!

Para obtener más información sobre las actividades de Microsoft Dynamics 365 (incluidas las entradas/salidas de propiedades de ejemplo), consulta la página Actividades para obtener una lista completa de actividades y enlaces a las páginas de detalles de la actividad.

  • Información general
  • Requisitos previos
  • Pasos
  • Construya su proyecto
  • Pruebe su proyecto

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado