DYNXCRM Library

DYNXCRM Library

Overview

The DYNXCRM Library is an importable library containing functions to connect, authenticate, and interact with Microsoft’s Dynamics 365 CRM. This library is used in the Microsoft Dynamics 365 CRM Adapter.

Import the DYNXCRM library into your project. Typically only the DYNXCRMclient module needs to be required in order to create the client and access the API methods.

require "DYNXCRM.DYNXCRMclient"

How it works:

Use the Translator’s built in help to review how to use each function:

Creates the DYNXCRM adapter framework, adding the various method modules to a metatable and storing the configurations added to the custom fields.

Create a query SOAP XML from a given fetch XML template.

Create an update SOAP XML from a given set of inputs and entity details.

Performs a custom POST API call to Microsoft Dynamics 365 CRM.

Creates a formatted date string for entry into the CRM, either from a given date value or the current date.

Fetches entities from the CRM and returns the XML-derived attributes as Lua tables.

Generates the SOAP header with the necessary authentication tokens.

Updates an entity in Microsoft Dynamics 365 CRM.

Additional utility functions:

Converts the given unix epoch time to UTC or provides the current Unix epoch time in UTC.

Takes a raw fetch XML and updates filter conditions in the XML

Create a XML snippet (a:KeyValuePairOfstringanyType) for an attribute.

Create a XML snippet (a:KeyValuePairOfstringanyType) for an optionSetValue attribute.

Create a XML snippet (a:KeyValuePairOfstringanyType) for a related entity.