Plese note: the Microsoft Dynamics CRM component has been deprecated and is no longer supported. We highly recommend migrating to the newer Microsoft Dynamics CRM v2 component, which offers improved functionality and ongoing maintenance.
Please update your codebase to utilize the Microsoft Dynamics CRM v2 as soon as possible to ensure compatibility with future updates and benefit from the latest features.
The component is configured to use certain fields for checking if an item already exists in CRM. If an update field is configured for a particular entity, the CRM component will run an extra query for each message, using the ODATa “filter” parameter.
Based on this, the component will decide if ‘Update’ or ‘Create’ will be used.
Currently, update fields are defined in two ways:
It applies for all items, no matter if the have an update field or not.
“type” is the value provided as parameter when creating the action - you can find this in any action .js file.
Examples: QuoteId, ProductId, etc.
// Example from 'syncAccounts.js':
exports.process = require('./baseAction.js').createAction({
type: 'Account',
updateField: 'new_ExternalId'
})
If this is set, a query with a filter using this field will run. If the object is found ( = id found), update based on the id will be done.
Exception: Changing this field will not have effect for actions like “%actionname%Details.js”, because “baseListAction.js” sets it as “ProductDescription”.
Details (or Lines) of Quotes, Invoices and Orders: the “%actionname%Details.js”, which are used automatically when Quotes, Invoices and Orders are created, represent a special case. The updateField used is ‘Description’, and it is setup as updateField by baseListAction.js. The updateField for Details (or Lines) will be used only if the parent document is being updated. This was done for performance reasons, it prevents unnecessary extra requests.
The component will modify the ‘Description’ field from the message input, it will add:
Certain fields will not be available by default in CRM. Generally, what appears in JSON Schema files as “new_…” is custom fields. You need to configure the CRM instance to have these fields.
Triggers page size is 50.
Some performance problems may be observed especially for Quotes, Invoices and Orders - they all have lineas, meaning that processing them required a high number of messages. In practice, a few out of memory errors were observed. If this happens, try the following:
These are using baseListAction.js and baseDetailsAction.js.
The component is:
Adding the details one by one implies a risk: incomplete data in case an error is thrown while iterating through the details. Adding details in bulk would be a desirable option, however, this does not seem possible in CRM. Example for quote details: (RetrieveMultiple exists, but there is no CreateMultiple).