Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Overview

This Snap searches MS Dynamics 365 for Sales for an entity set using filter conditions. You can also apply query options to set criteria for the data you want, and the entity properties that should be returned.

Input and Output

  • Expected upstream Snaps: Any Snap with a document output view, such as the Mapper Snap.

  • Expected downstream Snaps: Any Snap with a document input view, such as the Mapper Snap.

  • Input: Query parameters for the search to be performed. This can either be entered using the Filter Condition field-set, or using a Mapper Snap upstream.
  • Output: A document with the result set that matches the specified search criteria.

Prerequisites

None.

Configuring Accounts

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Dynamics 365 for Sales AccountAccounts for information on setting up this type of account.

Configuring Views

Input

This Snap has exactly one document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view.

Troubleshooting

For trouble shooting purpose, try performing a similar operation directly on the MS Dynamics 365 for Sales user interface and collect the necessary data. Compare the data used in the User Interface with the SnapLogic pipelines to see if there are any inconsistencies.

Support

Known Issues

  • This Snap cannot display more than 5000 results per page. This is due to the limitation in Microsoft Dynamics 365 for Sales, which restricts the number of results retrieved to 5000.
  • The Object Type suggestions are limited to the Object Types available within the Microsoft Dynamics 365 for Sales v8.2 and v9.0. There is no current ability to suggest Custom Object Types.

Modes

  • Ultra pipelines: Works in Ultra Pipelines.
  • Spark mode: Not supported in /wiki/spaces/SD/pages/1437917 mode
    • .


    Snap Settings


    LabelRequired. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline.
    Object type

    Required. The MS Dynamics 365 for Sales object type.
    Example: account
    Default value: account

    Page Size

    Use the page size feature to make paging in an application faster for large datasets.

    Default Value: 1000

    Max Value: 5000

    Max Page Number

    This is the maximum number of pages of results that this Snap can return. When the specified page number is reached, or when no more records are available, this Snap stops loading any additional results.

    Enter 0 in this field to read all pages.

    Default Value: 0

    Filter conditionUse this field-set to specify search criteria to be used when this Snap is executed. If you want to use any special search functions in your search criteria, use the Filters option in the Parameter field of the Query Parameters field-set.

    Type

    The MS Dynamics 365 for Sales filter type.
    Example: and
    Default value: and

    Note

    Only "and" and "or" are supported by MS Dynamics 365 for Sales


    Attribute

    The MS Dynamics 365 for Sales filter attribute.
    Example: name
    Default value: none
    The MS Dynamics 365 for Sales object type attribute to apply the filter.

    Operator


    The MS Dynamics 365 for Sales filter operator.
    Example: equal
    Default value: equal
    The operator to be applied to the filter attribute.

    Value


    The MS Dynamics 365 for Sales filter value.
    Example: MyAccountName
    Default value: none
    The value to be applied to the filter operator.
    Query Parameters
    Use the Query Parameters field-set to define search query parameters and their values. The query parameters will be attached to the URL using the HTTP query parameter syntax, separated by & and added as key=value.

    Parameter


    Enter here the attribute that would be used as a key in your query. As of this version, the following parameters are enabled for this Snap:

    • top: Limiting results using top prevents page size preference from being applied. You can use page size preference or top, but not both at the same time.
    • expand: The expand parameter enables you to control what data from related entities is returned. For more information on using the expand parameter, see Query Data Using the Web API.
    • filter: Select this parameter if you want to use special functions along with the filter conditions in your search query. MS Dynamics 365 for Sales provides a number of special functions that accept parameters, return Boolean values, and can be used as filter criteria in a query. For a list of these functions, see Microsoft Web API Query Function Reference.

      The following is an example of the Between Function searching for accounts with a number of employees between 5 and 2000:

      Paste code macro
      Example:
      filter=Microsoft.Dynamics.CRM.Between(PropertyName='numberofemployees',PropertyValues=["5","2000"])


    Value


    Specify the value associated with the parameter chosen in the Parameter field in the Query Parameters field-set.
    Order byUse the Order by field-set to specify the order in which items are returned when the search is executed.

    Attribute

    Use this field to select the attribute that you want to use to order the search results.

    Sort order

    Select Ascending or Descending to specify the sort order in which you want your search results ordered.
    HTTP header

    Additional HTTP headers to pass when sending requests to the Dynamics 365 for Sales instance.

    Example:

    Key

     Value
    Prefer odata.include-annotations="*"

    Default value: No default value

    Multiexcerpt include macro
    nameSnap Execution
    pageSOAP Execute


    Multiexcerpt include macro
    nameSnap_Execution_Introduced
    pageAnaplan Read


    Example

    Using the Dynamics 365 for Sales Search Snap to Search for an Object

    Basic use case: Using the Snap to search for an object.

    Expand
    titleUsing the Dynamics 365 for Sales Search Snap to Search for an Object

    The following pipeline demonstrates a basic use case of the Dynamics 365 for Sales Search Snap, where the Snap logs in and searches for an object.

    1. Search for and click and drag the Dynamics 365 for Sales Search Snap on to the canvas. Configure the account for the Snap and click the Settings tab


    2. Enter the object type of the object that you want to search.
    3. Enter the conditions you want to use for your search by clicking the + button in the Filter condition fieldset. This adds a row of fields that you can use to specify your search criteria. In this example, we are searching for an object that has a specific date value for the "createdon" attribute.
    4. Save your changes and execute the pipeline. The Snap logs into the MS Dynamics 365 for Sales DB and retrieves results based on your criteria:

    Download the sample pipeline

    Using the Dynamics 365 for Sales Search Snap with a Mapper Snap Upstream

    Basic use case: Using the Snap to search for an object using criteria specified in an upstream Mapper Snap.


    Expand
    titleUsing the Dynamics 365 for Sales Search Snap with a Mapper Snap Upstream

    The Dynamics 365 for Sales Search Snap can also be used with upstream Snaps. In this example, we shall use a Mapper Snap to supply the Search Snap with the account ID of the record that we want to search.

    1. We add and configure the Mapper Snap to label and supply the account ID that must be used for the search, as '$accountid':
    2. We now add a Dynamics 365 for Sales Search Snap, which we configure to use the values saved in the upstream Mapper Snap for performing a search of the MS Dynamics 365 for Sales DB:
    3. We map the attribute in the DB tables with the values specified in the Mapper Snap, save our changes, and execute the pipeline. For a successful run, the Snap should display the record that has the account ID specified in the Mapper Snap:

    Download the sample pipeline


    Downloads

    Attachments
    uploadfalse
    oldfalse
    patterns*.slp,*.zip

    Insert excerpt
    MS Dynamics 365 for Sales Snap Pack
    MS Dynamics 365 for Sales Snap Pack
    nopaneltrue