a!dynDelete() Function

Deletes a business object from Dynamics.

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

Syntax

a!dynDelete( 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 delete, given as a dictionary with fields for EntityName and Id (GUID).

Returns

Writer

This function returns a writer and must be used with the bind() function.

See also:

Examples

Delete an Account

Copy and paste the expression into the INTERFACE DEFINITION in EXPRESSION MODE, save it, then call the interface in a Tempo Report to test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
=load(
  local!accountId,
  local!dynDeleteWriter: bind(
    null,
    a!dynDelete(
      scsExternalSystemKey: cons!DYN_SCS_KEY,
      usePerUserCredentials: true,
      endpoint: cons!DYN_ENDPOINT,
      parameters: _
    )
  ),
  {
      a!textField(
        label: "Account ID to Delete",
        value: local!accountId,
        saveInto: local!accountId
      ),
      a!buttonArrayLayout(
        buttons: {
          a!buttonWidget(
            label: "Delete",
            style: "DESTRUCTIVE",
            value: {
              EntityName: "account",
              Id: local!accountId
            },
            saveInto: local!dynDeleteWriter
          )
        }
      )
  }
)
FEEDBACK