locked
Data Import: Boolean to become a data grid (1:N relationship) RRS feed

  • Question

  • Hi there,

    I am currently evaluating a migration exercise from a CRM 4 to CRM 2011.

    In the current system, the customer created several boolean fields for languages a contact can speak (e.g.: Spanish, English, Portuguese, Italian, ...).

    What I am proposing is to add a Language entity and have a 1:N relationship (a contact can have many languages).

    I wonder how the data import would be carried out in this case, since a boolean column from the source data must match a relationship with a record from a custom entity. Any thoughts?

    Cheers for the help!

    P.


    MCC, MCP, MCTS
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Friday, March 16, 2012 3:26 PM

Answers

  • As Daniel says the Data Import Wizard does not have this kind of transformation capabilities but in this case I think you can fairly easily add this capability. It will require that you create some temporary fields and a workflow:

    1. Create your 1:N relation, forms etc
    2. For each checkbox that currenlty exist also create a checkbox in CRM
    3. Create a workflow on the entity that triggers on create
    4. In this work add a Condition to check if the first checkbox is True. If so create a record in the 1:N relation table, setting the language to a fixed value and the parent record to the current workflow context
    5. Repeat this condition/create for every checkbox (do not use else if but always a new if condition)
    6. Save and publish your workflow
    7. Run the import using the out of the box data import wizard
    8. Wait for the import and workflows to complete
    9. If desired Delete the checkboxes and workflow or you can simply hide them from the interface .


    Patrick Verbeeten
    www.patrickverbeeten.com
    www.wavextend.com

    • Marked as answer by pmdci Tuesday, March 20, 2012 10:27 AM
    Saturday, March 17, 2012 9:01 AM

All replies

  • This would be a good chance to use ETL tool to do the transformation. 

    If you like to write code to do this, it is also possible, you would need to translate the boolean value to the lookup. 

    I don't think the OOTB CRM Data Import Wizard can handle this kind of transformation. 


    Daniel Cai | http://danielcai.blogspot.com | @danielwcai

    Friday, March 16, 2012 11:02 PM
  • As Daniel says the Data Import Wizard does not have this kind of transformation capabilities but in this case I think you can fairly easily add this capability. It will require that you create some temporary fields and a workflow:

    1. Create your 1:N relation, forms etc
    2. For each checkbox that currenlty exist also create a checkbox in CRM
    3. Create a workflow on the entity that triggers on create
    4. In this work add a Condition to check if the first checkbox is True. If so create a record in the 1:N relation table, setting the language to a fixed value and the parent record to the current workflow context
    5. Repeat this condition/create for every checkbox (do not use else if but always a new if condition)
    6. Save and publish your workflow
    7. Run the import using the out of the box data import wizard
    8. Wait for the import and workflows to complete
    9. If desired Delete the checkboxes and workflow or you can simply hide them from the interface .


    Patrick Verbeeten
    www.patrickverbeeten.com
    www.wavextend.com

    • Marked as answer by pmdci Tuesday, March 20, 2012 10:27 AM
    Saturday, March 17, 2012 9:01 AM
  • Hi Patrick,

    What a great idea. This is exact the sort of support I was looking for =)

    Regards,

    P.


    MCC, MCP, MCTS
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Tuesday, March 20, 2012 10:29 AM
  • Hi Patrick,

    What if I need to do this for a N:N relationship? I looked into workflows and perhaps this isn't possible? I created a new questions here: http://social.msdn.microsoft.com/Forums/en-US/crmdevelopment/thread/f54d75c4-0506-4f23-b227-b4e571ee7046

    Cheers,

    P.


    MCC, MCT, MCP, MCTS
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Friday, April 13, 2012 2:30 PM