How to import CRM Leads

When you go to "CRM | Periodic | Import | Leads" you receive the following message in the InfoLog:

"An administrator must first configure or define a format for the Lead import"

This is because the CRM Import in Dynamics AX 2009 is based on XML files and AIF Classes. Before CRM Leads can be imported from an XML file, the AxBC classes to be used during the import have to be set up and an XSLT file (transform) to do the conversion has to be specified.

You need the following files to be able to do this:

  • SysImport.Leads.xsl
  • SysImport.Leads.xsd
  • Leads.xml

(the files are attached to this entry)

  1. Start Dynamics AX 2009 Client
  2. Go to Basic | Setup | Import | Documents
  3. Enter the following values in the Documents form:
    Name: CRMLead
  4. Description: CRM Lead Document Class
  5. Document Class: AxdSysImportLeads
  6. Click at the "Validate" button
  7. Verify an InfoLog shows up with the following message:
    "Information: Validation passed"
  8. Close the InfoLog
  9. Close the Documents form
  1. Go to Basic | Setup | Import |Transformations
  2. Enter the following values in the Transformations form:
    Name: XmlToLead
  3. Description: Converts generic Xml to Lead
  4. Document Class: CRMLead
  5. Click at the "Load" button
  6. Select the file "SysImport.Leads.xsl"
  7. Click at the "Validate" button
  8. Verify an InfoLog shows up with the following message:
    "Information: Validation passed"
  9. Go to the tab "General"
  10. Verify that "Type of transformation is" the value "XSLT"
  11. Verify the for the group "XSLT" the field "Content" is filled with the content of the xsl file
  12. Close the Transformations form
  1. Go to Basic | Setup | Import | Formats
  2. Enter the following values in the Formats form:
    Name: XmlFormat
  3. Description: Processes Xml Files
  4. Extenstions: *.xml
  5. Document Class: CRMLead
  6. Active: <Checked>
  7. Save the record ([CTRL]+[S])
  8. Click at the "Transformations" button
  9. Enter the following Values on the Format transformations form:
    Transformation: XmlToLead
  10. Close the Format transformations form
  11. Click on button "Validate" on the Formats form
  12. Verify that the Import form shows up
  13. Select the file "Leads.xml"
  14. Click on OK
  15. Verify an InfoLog shows up and contains the following message:
    "Validation passed"
  16. Close the Formats form

The CRM Leads import was now completely set up and you can start the import by going to:
CRM | Periodic | Import | Leads.

Please note:
If you received an error message on step 9 during validation "Field 'Lead ID' must be filled in." make sure you have selected an automatic counting Number sequence for "Lead ID".

--author: Alexander Lachner
--editor: Alexander Lachner
--date: 23/04/2009

Comments (7)

  1. Where did you get the xsl xml and xld files

    for Leads from As I need these files for Contact Person as I wish to import these


  2. Hi Chris,

    I’ve updated the attachment to include also the needed import files for Business sectors and Contacts.

    Best regards,


    (Member of the EMEA Dynamics AX Support Blog Team)

  3. Naz says:

    Hi, any clused what the following error means when doing this:

    Access to the path ‘C:Program FilesMicrosoft Dynamics AX50ServerLiveLog86909ED8-ACAD-4788-9407-ABE041A2DA8A.xml’ is denied.

    Otherwise much thanks for this. I am using it to import contacts, but getting the above error. Thanks for any help!

  4. Hi Naz,

    Looking at the outlined path I assume the issue exists on the AOS and not your client PC.

    As a start I suggest to ensure the folder “C:Program FilesMicrosoft Dynamics AX50ServerLiveLog” exists and the Service Account the AOS is running has read and write permission to this folder and the files placed here.

    If the issue persists, try temporarily disabling access based Virus Scanners on the AOS to see if this makes any difference.

    Best regards,

    (Member of the EMEA Dynamics AX Support Blog Team)

  5. Shyam J says:

    Hi Alex:  Do you have the files for Business Relations as well? Would appreciate it if you could post these too


  6. Hi Shyam,

    Importing Business Relations is different than the procedure outlined in this post. Here need to follow the classic approach importing data into the smmBusRelTable.

    But because of the Global Address Book some extra steps are required, similar to those you need to perform when importing Customers or Vendors.

    The following KB article should give you a good start…
    KB960729 How to import customers and vendors in Microsoft Dynamics AX 2009

    Best regards,
    (Member of the EMEA Dynamics AX Support Blog Team)

Skip to main content