Hello,
I'm trying to solve a simple issue with updating data in MDO-CRM Version 1710 (9.1.0.4633) online.
Problem:
A process was created previously which incorrectly set a field value on case (incident) records. I need a bulk data operation to fix the incorrect data.
I wrote a simple custom workflow which can be triggered on-demand to run through the records and update the bad data.
This workflow has to re-open closed records in order to be allowed to actually write to the record (because that's awesome), write the update, then close the record with the same status code etc.
I've done all this but of course there's another problem (it's CRM right). Legacy workflows, which are setup to execute on status change, are triggered by the fact that I change the status when I open/close the records.
I need a way to run my code in isolation from the other business logic of the application. This is just standard developer stuff. Why would I do maintenance through a business logic layer? After searching around I found exactly 1 article that eluded to the fact that you could do this with an on-demand workflow but of course the article was written by a consultant agency (blog advertising tripe) and they failed to elucidate on how exactly to isolate my code.
Alternately I've considered throwing out my custom workflow code and simply writing a console application using the xrm tooling common data (whatever they call it) classes to perform the same operations. My concern here is that I spend the time to do so only to find that this too triggers business logic in the same way my custom workflow does.
Anyway CRM makes me a sad developer. I know it makes money for consultants and MS but this is such a waste of money if you're a developer looking for productivity. This is a 15 minute job in a real developer environment. I wrote the solution in 1/4 day and spent the next 2 attempting to overcome impediments built into the application.
Anyone have a way to isolate my code or an alternate solution or know if I re-write as specified above if this will trigger the same business logic issues?
Thanks Very Much,
BugDug (really don't bug me, I gotta change this name, what was I thinking?)
*This post is locked for comments