locked
Trim spaces in account's name RRS feed

  • Question

  • Hi all,

    I have an workflow that creates an account for every new contact. The idea is that the account name is built based on the contact's first name, middle name and last name.
    The problem is, if one of them is empty, an extraspace will appear in the account's name.

    How can i solve this by workflow? I don't want to iterate through the accounts because are a lot of them.

    Thanks!
    Wednesday, February 24, 2010 11:52 AM

Answers

  • If you didn't want to write a custom workflow action like Muhammad has suggested, then you could write some conditional branches into your workflow.

    For example:
    If the Middle Name does not contain data... do this, else:
    If the Middle Name contains data... do this.

    Hope this helps, Neil
    • Marked as answer by Irinel Crm Friday, February 26, 2010 3:08 PM
    Wednesday, February 24, 2010 2:00 PM
    Moderator
  • The best solution i have found is to run a sql query on crm database
    • Marked as answer by Irinel Crm Friday, February 26, 2010 3:08 PM
    Friday, February 26, 2010 3:08 PM

All replies

  • Is this a custom workflow? i think in normal workflow, you may not be able to do it. There is no trim function in workflow i think in a custom workflow you can do it very easily in C# or vb.net.


    Muhammad Ali Khan
    My MS CRM blog
    • Marked as answer by Donna EdwardsMVP Thursday, February 25, 2010 5:49 PM
    • Unmarked as answer by Irinel Crm Friday, February 26, 2010 3:08 PM
    Wednesday, February 24, 2010 1:01 PM
  • If you didn't want to write a custom workflow action like Muhammad has suggested, then you could write some conditional branches into your workflow.

    For example:
    If the Middle Name does not contain data... do this, else:
    If the Middle Name contains data... do this.

    Hope this helps, Neil
    • Marked as answer by Irinel Crm Friday, February 26, 2010 3:08 PM
    Wednesday, February 24, 2010 2:00 PM
    Moderator
  • The best solution i have found is to run a sql query on crm database
    • Marked as answer by Irinel Crm Friday, February 26, 2010 3:08 PM
    Friday, February 26, 2010 3:08 PM