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.

UPDATE    UserSettings

SET        PagingLimit=2000

WHERE    SystemUserId IN

    (Select SystemUserId

     from    SystemUserBase

     where FullName like
‘system administrator’)

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.

Happy CRM’ing

Avatar for Joe D365

Joe D365

Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.