Saturday, September 7, 2013

Why should'nt we Direct T-SQL Update on a CRM Database Solid Reasons from Microsoft MVPs!!



Jamie Miley

    If you are using Auditing in CRM, it won't reflect any changes done by manual database update.

    Modified, by, modified on, etc... will also not be adjusted properly

    PrincipleObjectAccess table will not be updated based on manual updates and so permissions will not be properly set on any inserted, updated, deleted records.

Scott Sewell

     Database updates to CRM, if you did updates to something that affects security (owner, business unit, etc...) no updates would occur to PrincipleObjectAccess table

    Updating Name fields will cause issues because lookups tend to cache names


Damian Sinay:

    Plugins and/or workflows won't fire

    Also caching is an issue, any cached data won't be invalidated by a database operation.

Gustaf Westerlund

    If you are not 110% sure what youa re doing you are risking the stability of the entire system.

Julie Yack

    It’s bad karma to do unsupported stuffs when a supported way will do it.

Carston Groth

    Relations might get lost if you´re only performing the action on one datebase table ignoring all related tables

Joel Lindstrom

    Biggest reason is that it will appear to work initially but problems will crop up later and you won’t be able to connect the dots to the real issue because the issue won’t be caught by the normal error reporting mechanisms.

Example:

Customer manually loaded contact records and later couldn’t reassign them. Turned out to be because in their manual load they didn’t populate businessunitid. The contacts worked, but couldn’t be reassigned later because that field wasn’t populated, but the error message generated didn’t explain what the problem was, because records created in a supported way always have that field populated

Different customer manually overwrote the createdby and modifiedby using unsupported T-SQL. Records initially appeared to work OK; however, when users attempted to forward the message in CRM, they got an error. Again, since this was a delayed error situation that showed up months later, it was very difficult to find the real reason for the error—all diagnostics did not show the real problem.

So to me, that is the biggest reason not to create records in an unsupported way. It is very difficult to verify that it is correct because standard system data validation does not fire, and if you miss anything, the real problem may not show up for months and will most likely be outside of the normal error reporting mechanism. You are on your own. Was it worth it?

In Conclusion

In the end, I think these are all great ideas regarding the issue.  I really just want to echo Gustaf above.  The fact is that it is considered unsupported for a reason.  Microsoft doesn't want to deal with it either.  All unsupported customizations are adding serious risk to your entire implementation as Microsoft would be entirely within their right to wipe their hands of the entire implementation when they can show that these types of things are being used.  The API and SDK are there for a reason, please use them. There are ways to do almost anything you could be trying to do that would cause you to go an unsupported route.  This is where a good partner can really steer you in the right direction.  You have already invested a lot of money on your Dynamics CRM implementation in software costs and in most cases consulting time to put it into place and get it customized properly, protect that investment!

No comments:

Post a Comment