Page 1 of 1

Read-only columns in Dynamics365 driver

Posted: Wed 04 Sep 2019 15:24
by azKevin
Hi,
I'm doing an evaluation of the Dynamics 365 driver and up to now it's been really good, thanks.
I'm doing a large scale migration from an on-prem 2011 server up to 365 in the cloud.
I've come across what will be a shop stopper for me if it can't be fixed/worked around. I'm trying to update the modifiedon column in a table (contact) and I get the error message:

SQL error: [Devart][ODBC][Dynamics CRM]Column 'modifiedon' is read-only and cannot be used in the 'UPDATE' statement, SQL state S1000 in SQLExecDirect

Which is fine as it maintains the audit trail, but I need to change it. There are some 3rd party tools which claim to maintain this time stamp and I presume they are using the same underlying API as you are.
So my question to you is , is this a behaviour a run-time thing that can have an option set somewhere to override it or is the way it works and can not be changed?
thanks in advance
Kevin

Re: Read-only columns in Dynamics365 driver

Posted: Fri 06 Sep 2019 14:33
by MaximG
Official documentation https://docs.microsoft.com/en-us/dynami ... ce-odata-9 confirms that the "modifiedon" field is "Read Only" - we are not able to impact this behavior. You can contact Dynamics 365 support team to request an option to change such fields.

Re: Read-only columns in Dynamics365 driver

Posted: Mon 09 Sep 2019 14:36
by azKevin
Hi Thanks for that, yes seems there are four fields you can't impact (date created and modified & username who created and modified the record), as the wntire thing is view based there are other read-only fields as well.
looks like you have to write a plugin to manipulate these fields at the correct point in the pipeline, for anyone who faces the same issue this link https://debajmecrm.com/2019/05/12/creat ... amics-365/ and https://community.dynamics.com/365/b/le ... dby-fields explains it all.
Thanks again for looking

Re: Read-only columns in Dynamics365 driver

Posted: Wed 11 Sep 2019 15:59
by MaximG
We'll investigate the possibilities of implementing the requested behavior.