Enreach.API.Xrm.updateRecord
Updates an entity in Dynamics with a retry logic, to ensure that in case CIF CRUD API fails, the operation will more likely succeed.
Parameters:
entityLogicalName
: The table logical name of the record you want to update. For example: "account".id
: GUID of the table record you want to updatedata
: A JSON object containingkey: value
pairs, where `key` is the property of the table andvalue
is the value of the property you want to update.maxRetries
: Maximum number of retries, if the operation against Dynamics API fails. Optional, default value is 3.delay
: The amount of milliseconds to wait between two retries. Optional, default value is 1000 (1 second)
Microsoft CIF API works so, that from within the widget it sends a message to main window using window.postMessage()
JavaScript method, and then waits for the main window to return the result in the same way. Timeout of this mechanism is 10 seconds, so CIF API considers the request as failed after not receiving any response in 10 secs, even if it actually succeeds after the timeout. As a result, retrying might update the same record multiple times in Dynamics, so this API feature must be used only if multiple updates don’t cause serious problems.
The purpose and usage of the method is identical to the underlying API provided by Microsoft, the only addition is the retry logic.
© Enreach, Mannerheimintie 117, 00280 Helsinki, Finland
+358 40 450 3000, www.enreach.fi