Workflows in dynamics crm 4 allows us to easily manipulate records, change data, and do various things. In addition to being great for automation, they are great for ‘fixing stuff’. For example, let’s say after a big data migration you forgot to set the primary contact on your accounts. You could then re-write the whole migration OR run a workflow in batches of 250 records at a time. But, with a small unsupported sql change, you can run this same workflow in much larger batches. This is unsupported and we are explaining here only for test purposes.
So here’s the workflow. In our case, it is a simple workflow that checks to see if the contact’s parent account has a primary account. And if not, sets this contact as the primary contact.
Now we have to make a small change behind the scenes to allow us to run this on many contacts. In this case I set it to 2000 rows at a time.
WHERE SystemUserId IN
where FullName like
Now you can run the workflow in all 2000 records at a time:
To reset the max number of records back to normal, just go to ‘personalize workplace’ and pick one of the standard options: 50, 100 , etc.
If you need assistance feel free to reach out to the CRM Experts as PowerObjects – the only thing we do is Microsoft Dynamics CRM and with 100’s of customers we found solutions to most anything you can think of.