Showing posts with label XML CRM. Show all posts
Showing posts with label XML CRM. Show all posts

Tuesday, 25 August 2015

What’s New: CRM 2015 Update 1 Export to Excel, Catch the Difference: New file extension supported: xls!!

Well, this post is actually part of my inadvertent research when I was performing trial for CRM 2015 Online Update-1.

In this post I would like to share about new Export to Excel feature in the newest version. This feature is not new, but you might be confused if you don’t read this post when you try the newest version.

Now, let’s start with the previous version

Previous Version

When we click the ribbon, it will happen:

image

CRM 2015 Update-1 Version

While in newest version now:

image

Is that the only Pop Up Windows vs. Non-Pop Up?

The answer is ‘NO’

The New Immersive & Inline Editing Excel Online

Are you sure?
The answer is ‘YES’.

Now, with the integration to MS Office Online with Office 365 Account your desire to do mass CRM Update with Excel beside the export and import feature is realized here.

image

*You can do mass update, bulk update, new records and performing the same Excel things inside this.

image

While you also have the inline validation:

image

Create new record is just so easy

image

image

You can just save it back to the CRM!

image

*No more export import as extra moves.
Amazing, right??!!

No More Hassle in performing RE-IMPORTING

Previously:

image

Now:

image

So, where it goes?
Just click the ‘Static Worksheet’

Then it will export out the Excel with the current view data

No more XML Big Size Causing System Becoming ‘Hang and Lack’

Previously, when you check the re-import, it will export out the .XML and it big size with possibility to cause any trouble during opening the file, even it can harm your PC and make it hang, not responding…Sad smile

image

*Compare the size..

The first one is previous version, it is XML with bigger size, while the second one is the latest CRM 2015 Update-1 version, it exports out as XLS

And here we go:

image

If you notice, the extension is different, then how CRM can detect whether there is any update or new record or not modified in this excel sheet.

It actually uses the same concept, that is the column hiding that stores the indicator.
Now, just ‘UNHIDE’ it.

image

As you can see there are 3 hidden columns that will be used as indicator:

image

Now, let’s check it out.
I update 1 record and create new record of Contact entity:

image

Don’t worry, it also has the same XML validation concept:

image

Then continue the process

What’s New in Import Data?

Beside the Immersive Online, we can have new feature here:

*Previous:

image

*Now:

image

Have you notice the blatant different?

.XLSX is supported!!

Yess.. It is!

image

Well, now no need for you to convert it to .CSV or use the .XML file to do re-import thing and validation

I can just use the same XLSX to import back to CRM:

image

image

And as usual you can review under the Import page and then you can see the newly created record:

image

Conclusion

Finally, it can be concluded that the new method is introduced in the new feature that you might not be aware or documented with focus on this certain area, but I am sure we are agree to say that this is a great step forward for CRM since it can reduce the hassle of bulk update, you don’t need to maintain 2 different fields, one for creation then another one for update, with those in different format (XML and CSV) you don’t need to convert your XLSX file anymore since it can be read by CRM.

It is great future for those who often do the data migration and bulk update, previous version did not allow us to import XLSX file and we must maintain the XML File in order to update back to CRM, it was kind of risky and troublesome action to maintain bigger size file and have to do import twice.

Now with the new feature CRM can detect the UPSERT action in single way, either UPDATE existing record or INSERT new record, combined as UPSERT Method that indeed is newly introduced in the newest version.

Hope this helps!
Thanks.

Sunday, 26 April 2015

Import Case, Account, and Contact (Multiple Entities–3 Entities ) at Once in Single File in CRM Import Wizard

In my previous post, I was talking about how to solve the unresolved lookup reference between primary entity and child entity which I Put Customer and Case as the entities.

Now, what if I want to import them at once.

A Case reference to a Contact that Parent Company is an Account, which is Primary Contact is the Contact itself.

So it is a chicken and egg circuit, circle round and always in the loop.

Now, prepare your data map

*You can get your simple sample data map by importing to CRM and make sure you map all fields correctly and then save and download your newly create data map

image

#0 Prepare the Source File

You can prepare the source file first then you can try to import to CRM to help you to create the Data Map and do mapping from your source to the CRM Target Entity and Attribute.

image

#1 Create New Custom Data Map or Use the Existing One and Download It

*As mentioned before you can use the existing data map and modify it.
If you noticed, you can learn how to create new data map from the ‘For Generic Contact and Account Data’

http://blogs.msdn.com/b/crm/archive/2010/11/04/importing-two-or-more-entities-from-a-single-file.aspx

And here our objective is to import 3 entities so that we need to create new Data Map.

#2 Edit the Data Map XML

Here is the XML of the data map:

<Map Name="Case Single File with Account and Contact Reference" Source="Import">
  <Description>Data map created automatically using the map settings specified during an import.</Description>
  <EntitiesPerFile>Multiple</EntitiesPerFile>
  <EntityMaps>
    <EntityMap TargetEntityName="incident" SourceEntityName="Case" Dedupe="Ignore" ProcessCode="Process">
      <AttributeMaps>
        <AttributeMap>
          <SourceAttributeName>Case Title</SourceAttributeName>
          <TargetAttributeName>title</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
        </AttributeMap>
        <AttributeMap>
          <SourceAttributeName>Customer</SourceAttributeName>
          <TargetAttributeName>customerid</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
          <LookupMaps>
            <LookupMap>
              <LookupType>System</LookupType>
              <LookupEntityName>account</LookupEntityName>
              <LookupAttributeName>name</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
            <LookupMap>
              <LookupType>System</LookupType>
              <LookupEntityName>account</LookupEntityName>
              <LookupAttributeName>accountid</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
            <LookupMap>
              <LookupType>System</LookupType>
              <LookupEntityName>contact</LookupEntityName>
              <LookupAttributeName>contactid</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
            <LookupMap>
              <LookupType>System</LookupType>
              <LookupEntityName>contact</LookupEntityName>
              <LookupAttributeName>fullname</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
          </LookupMaps>
        </AttributeMap>
      </AttributeMaps>
    </EntityMap>
    <EntityMap TargetEntityName="account" SourceEntityName="Account" Dedupe="Eliminate" ProcessCode="Process">
      <AttributeMaps>
        <AttributeMap>
          <SourceAttributeName>Account</SourceAttributeName>
          <TargetAttributeName>name</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
        </AttributeMap>
        <AttributeMap>
          <SourceAttributeName>Contact</SourceAttributeName>
          <TargetAttributeName>primarycontactid</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
          <LookupMaps>
            <LookupMap>
              <LookupType>System</LookupType>
              <LookupEntityName>contact</LookupEntityName>
              <LookupAttributeName>fullname</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
            <LookupMap>
              <LookupType>Source</LookupType>
              <LookupEntityName>Contact</LookupEntityName>
              <LookupAttributeName>Contact</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
          </LookupMaps>
        </AttributeMap>
      </AttributeMaps>
    </EntityMap>
    <EntityMap TargetEntityName="contact" SourceEntityName="Contact" Dedupe="Eliminate" ProcessCode="Process">
      <AttributeMaps>
        <AttributeMap>
          <SourceAttributeName>Contact</SourceAttributeName>
          <TargetAttributeName>lastname</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
        </AttributeMap>
        <AttributeMap>
          <SourceAttributeName>Account</SourceAttributeName>
          <TargetAttributeName>parentcustomerid</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
          <LookupMaps>
            <LookupMap>
              <LookupType>System</LookupType>
              <LookupEntityName>account</LookupEntityName>
              <LookupAttributeName>name</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
            <LookupMap>
              <LookupType>Source</LookupType>
              <LookupEntityName>Account</LookupEntityName>
              <LookupAttributeName>Account</LookupAttributeName>
              <ProcessCode>Process</ProcessCode>
            </LookupMap>
          </LookupMaps>
        </AttributeMap>
      </AttributeMaps>
    </EntityMap>
  </EntityMaps>
</Map>

*Which i will explain each node..

The most important is this XML Node:

image

This will indicate, eventhough it is in single file, you want to split them into different entities.

Now, for making it clearer, I try to hide the detail thing first and put the high level perspective here:

image

Basically, we have 4 important components

Map Source Node

-> This node is important because this will become the unique identifier for naming the Data Map

Description

-> Not important but you gonna need it to make it clearer

Entities Per File

-> Single or Multiple?

-> Very important to indicate whether you want to import to split or one entity only

Entity Maps

-> Very Important

-> You need this for mapping, the very fundamental thing

-> Can have multiple <EntityMap/> node that the number will determine how many multiple entities you want to import to

Entity Map

Now, here is your mapping for each entity:
Case

image

I have Case Title + Customer fields as Source and Target.

While for Case Title it is very straight-forward because it is a Text field, while for Customer field, little bit difficult because it is a lookup field and not only to single entity with single field as reference.
Account

image

I will have Source field: Account and Contact in my source files which i want to link them together.

I want to create new Account with Primary Contact  from my Contact field and vice versa for Contact below
Contact

image

I need to make sure that the Contact will be linked to the Account as Company.

*You need to make sure that the Source and Target are correct, but CRM would always check it once you try to import the Data Map

#3 Import the Data Map

Now just import it to the Data Map

Microsoft Dynamics CRM –> Settings –> Data Management –> Data Maps

image

And then click Import

Then the system will validate it.

#4 Back to the Source Files and Fill the Data

You can back to your file again to do re-checking before importing (even though you can delete it later)

image

So example here, I expect I will create new Case for row 5 and 6 with new Customer (Account/Contact that link each other).

I expect the system will create new Case with Title = Question about new Membership, with Customer = Aileen Gusni,

To make it happened, at first, the system need to create Aileen Gusni as Contact first, but Aileen Gusni also needs Jakarta Fluid Tech as her Company name.

So, CRM will also create Jakarta Fluid Tech as Account with Primary Contact = Aileen Gusni and Vice Versa, Jakarta Fluid Tech as Aileen Gusni’s Company name. While the newly created Case will be linked to Aileen Gusni as the customer.

And so on..Same for other Cases, Accounts, and Contacts.

#5 Import To CRM


Import to CRM as usual, but remember to Use our Data Map


image

You can see the Mapping, you would notice that the system will auto-map into 3 entities as same as you defined in the data Map, especially the <EntityMaps> node. you can make it ‘Ignore’ or just leave it and Next


image

And here is the Review Mapping Summary, you will realize that the CRM auto-split the field into 3 different actions of Entity import as pre-defined Entities in your Data Map.

image

Result

After the Import was completed, I go to the Case and I find this!

Case with Customer (Contact) Detail

image

As per our expectation.

Case Title and Customer are correct, while we know that Aileen Gusni is working for Jakarta Fluid Tech company.

Now, let’s go to the Company itself.

Company/Account Detail


image

Yes, as we can see the Primary Contact is beautifully set to the correct name.

Same as well with the other Account and Contact: Troy Co. and Adam Hings

image

Conclusion

Now, we understand that using the Data Map, you can do bulk import across multiple entities and multiple attributes, not only limited to one entity as well. Then you can also solve the big problem the ‘which one is the first’ question.

To make new data map, need to learn the XML Schema first, but never mind CRM will do checking for you.

I’d recommend to you to use the XML Editor or Visual Studio XML Editor, you can also use Notepad or Notepad ++ if you wish Smile.

In this post, I explained about how powerful data map can be your helper to do bulk import without you need to make effort in splitting them into 3 different files and import them in correct sequence, because CRM has capability to know its sequences. I believe that this is not only limited to 3 entities.

Hope this helps!

Thanks.