web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to bulk update a field to remove all spaces?

(0) ShareShare
ReportReport
Posted on by

Hi,

I am working with Crm Online. I would like to know how I could massively update a field from all records of an entity to remove spaces in the field (not only at the beginning or the end, but also in the middle). The person who asked for this operation don't want to do it through excel export/reimport. Is there a way this could be done with a workflow? Would the best solution to do it with an app console?

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Frantz,

    I'd use an app console for this if it's a one-time process. A workflow would work but you'd have to write custom code for it, then run the workflow on all the records. If it's a one-time process, you'll just end up deleting the workflow anyway.

    I'd definitely use a console app - query for record where the field Contains a space and make the updates.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

    EDIT: If this field will get data with spaces in it over time, you may want to write a triggered workflow or a plugin to handle those cases, but for the initial cleanup I'd still go with a stand-alone app.

  • Community Member Profile Picture
    on at

    Hi Aiden, thanks a lot for the tip. How could I write custom code for a workflow? Is it possible to go through C# plugin from a workflow? Thanks again for your help!

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Frantz,

    You can write c# for either a plugin or a workflow, but they're triggered differently. A plugin fires as a result of something being updated in the database (CRUD operation, Assign, etc). A workflow fires either manually or triggered, and always on one and only one record.

    I love building workflow assemblies - here's a good starter msdn.microsoft.com/.../gg334455.aspx

    And if you want to see some of the things they're capable of, check out my site at kaskela.wordpress.com

    Thanks,

     Aiden

  • martingr Profile Picture
    600 on at

    Hi

    We have the same issue. Did Aiden solution work for you?

    Why didn't the asker want to update this through excel export/reimport? I am considering this solution and are curious about the downsides with this approach..

    Thanks for any clearifications :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans