From version 3.0.2076 we have improved the Dynamics connector, please see our updated documentation here.
Data Sync can connect to multiple Dynamics CRM/365 configurations:
Data Sync supports all of these configurations utilising the same connection provider:
To open the connection window click on the 'Connect Data Source' in either the source or destination. This will display the 'Connect to Datasource' window. Choose 'Microsoft Dynamics' and then the 'Microsoft Dynamics CRM' provider.
To open the connection window click on the 'Connect Data Source' in either the source or destination. This will display the 'Connect to Datasource' window. Choose 'Microsoft Dynamics' and then the 'Microsoft Dynamics 365' provider.
URL:
This is the URL to your Dynamics 365 Organisation Service SOAP\WCF service.
This URL will be similar to: http://crm2016:5555/Org/XRMServices/2011/Organization.svc
to get your organisation URL go to Settings->Customizations->Developer Info
in Dynamics 365.
Authentication Type:
For Active Directory authentication use Managed Domain.
User Credentials: Enter any required credentials. If left blank the current process identity is used.
Entity:
If you have entered the previous information correctly, you should be able to use the Entity drop down menu to select an entity within the Dynamics 365 system.
Once you have created a connection you will be offered the chance to save it in the connection library. This is a great idea as you can then drag and drop entities and lookups at a later date without creating a new connection. The connection is stored in a file on your local system. To do this click on 'Connect & Create Library Connection', this will open the Connection Library window. Enter in a name and description (optional) for the connection and click OK. This is now saved in the connection tree view.
To connect to Dynamics 365 using Federated Authentication, Microsoft uses a feature called the WIF (Windows Identity Foundation). To enable this feature in Windows 8 and above type the following into a command line:
dism/online/Enable-Feature:Windows-Identity-Foundation
When using windows 7 or windows 2008 server you will need to install WIF runtime from Microsoft.
Dynamics 365 authentication provider scheme to use.
URL to your Dynamics 365 Organisation Service SOAP\WCF service.
DataTime handling: Utc or local.
Entity name.
Entity id column name.
Filter expression to add to the generated FetchXML to filter the records.
Output the request data to the log.
Number of records to return from CRM in each request, maximum 5000.
Maximum parallel requests sent to CRM server.
Service HTTP Request Timeout.
Number of updates to send to server in each request.
Please see below for a list of functions that can be used with the Dynamics 365 Provider in Project Automation or Dynamic Columns.
Execute any request on the OrganizationService
.
DataSourceB.ExecuteOrganizationRequest(request);
To call a workflow you can use the ExecuteWorkflowRequest
wrapper. To have it run once the data has been changed add it to the AfterAddItem() method within Item Events.
DataSourceB.ExecuteWorkflowRequest(new Microsoft.Crm.Sdk.Messages.ExecuteWorkflowRequest() { WorkflowId = Guid.NewGuid() });
DataSourceB.GetOptionSet(string entityName, string attributeName)
To get an instance of the OrganizationService
directly you can use:
DataSourceB.Connection.GetProxy()
Or if you are doing it from Dynamic Columns you need a cast to the connector type:
GetDataSourceB().Connection.GetProxy()
Call within Project Automation Item Events to set the state flags.
DataSourceB.SetState(item.ToDataCompareItem(), int StateCode, int StatusCode)
Call within Project Automation Item Events to set the owner flags.
DataSourceB.SetOwner(item.ToDataCompareItem(), Guid id, type)
type
can be either systemuser
or team
.
Get the value of when the entity was last changed.
DataSourceB.GetEntityLastChanged(string entityName, string filter)
DataSourceB.GetFetchFilterXmlForModifiedSince(DateTime)
Use this to update your source after a synchronisation has occurred. For example; return a state flag to mark the record as sent. Or update an ID column, so that the value matches that in Dynamics.
DataSourceB.UpdateSourceRow(AttributeCollection<string,object> properties, Guid id)