In this article
Table of Contents | ||||
---|---|---|---|---|
|
Overview
You can use this Snap to delete objects in Microsoft Dynamics 365 for Sales databases.
...
Snap Type
Dynamics 365 for Sales Delete is a Write-type Snap that deletes records from Microsoft Dynamics 365.
...
Expand | ||
---|---|---|
| ||
The following pipeline demonstrates a the basic use case of Dynamics 365 for Sales Delete Snap, where you use the Snap logs in and deletes to log in to the Dynamics 365 instance and delete an object: Select the object type of the object you want to delete , and then the Object ID of the object. Save your changes and exit. Add a CSV Formatter and File Writer Snap, so you can save the output of the Delete Snap. Execute the pipeline. For a successful run, the File Writer Snap should create a CSV document containing a confirmation of the deletion: |
...
Expand | ||
---|---|---|
| ||
You can also use the Dynamics 365 for Sales Snap with pipeline parameters. This enables you to declare variables at the pipeline level and calling call them from within the Delete Snap. This example shows how you can do so. We start off by specifying the object ID of the MS Microsoft Dynamics 365 for Sales object that you want to delete. In the previous example, we had specified this detail in the Delete Snap itself. However, you can also use pipeline parameters to provide this information. This enables you to use the same pipeline to delete different objects by changing only the value of the object ID variable at the pipeline level. You use the variable 'id' to refer to the account id that you want to delete: Once you have captured this information at the pipeline level, you are ready to configure the Delete Snap to use this information to delete objects in the target DB. You configure the Delete Snap as follows: You specify the Object type, and then, in the ID field, you enter the pipeline parameter variable value , with an '_' preceding it. Click the = button to signify that you are using variables using either the pipeline parameters or other functions and variables available to you within the application. Save your changes, exit the Snap Settings popup, and run the pipeline. If the pipeline executes successfully, you should see a message indicating that the object was deleted successfully, as shown above. |
...
Expand | ||
---|---|---|
| ||
The Dynamics 365 for Sales Snap can also be used with upstream Snaps. In this example, we shall use a Mapper Snap to supply the Delete Snap with the object ID of the object that must be deleted. We configure the Mapper Snap to label and supply the object ID that must be deleted , as $id: We then append the Delete Snap to the Mapper and configure it to receive the value in $id as input: The Delete Snap receives the object ID reference from the Mapper Snap and deletes the object associated with the specified object ID. In this pipeline, we have saved the confirmation output in a CSV file: |
...