a!dynRetrieve() Function

Retrieves the data for a given entity from Dynamics.

See the Dynamics documentation for the Retrieve operation for details regarding the parameters and other remarks.

Syntax

a!dynRetrieve( scsExternalSystemKey, usePerUserCredentials, endpoint, parameters)

Common Parameters:

scsExternalSystemKey: (Text) The key from the Third Party Credentials admin console page that corresponds to the set of credentials that should be used to authenticate.

usePerUserCredentials: (Boolean) If true the credentials set in the Third-Party Credentials settings page by the current user running the expression will be used. If false the site-wide credential values will be used.

endpoint: (Text) The Dynamics organization endpoint URL. For example, "https://yourcompany.crm4.dynamics.com/XRMServices/2011/Organization.svc".

Specific Parameters:

parameters: (Any Type) The entity to retrieve, given as a dictionary with fields for EntityName, Id (GUID), and ColumnSet.

Returns

The function returns the standard connector result dictionary described in the main Connectors page.

If successful, the function returns a dictionary representation of the Entity that was retrieved within the result field.

Examples

Retrieve Account Information

Copy and paste the expression into the Interface Designer, save it, then call the interface in a Tempo Report to test.

=load(
  local!accountId,
  local!entity,
  a!dashboardLayout(
    firstColumnContents: {
      a!textField(
        label: "Account GUID to Retrieve",
        value: local!accountId,
        saveInto: local!accountId
      ),
      a!buttonArrayLayout(
        buttons: {
          a!buttonWidget(
            label: "Retrieve",
            value: {
              EntityName: "account",
              Id: local!accountId,
              ColumnSet: {
                AllColumns: true
              }
            },
            saveInto: a!save(
              local!entity,
              a!dynRetrieve(
                scsExternalSystemKey: cons!DYN_SCS_KEY,
                usePerUserCredentials: true,
                endpoint: cons!DYN_ENDPOINT,
                parameters: save!value
              )
            )
          )
        }
      ),
      a!paragraphField(
        label: "Account Information", 
        readOnly: true, 
        value: local!entity
      )
    }
  )
)
FEEDBACK