Bojensen Blogs

Customer or Vendor import In Dynamics ax 2012 using Office add-ins

Customer or Vendor import is bit tricky now with Dynamics ax 2012. We have to follow certain steps to do that. Steps are documented below.  The reason why I am saying it is bit tricky because you have to deal with the GAB (Global address book) and its relationship with the Customer or vendor tables.  You can follow the below steps for successful import.  I am covering the blog with an example of Customer.

Minimum required fields to create the Customer records are listed below. You need to make sure that the following fields must be filled
in.

Currency Customer account Customer group Name.Party ID Name

You also needs to be make sure that if customer table is referencing any other table record like Currency, which have stored in another table, similarly customer group and Name which are also stored in another table, so those tables must be filled in with the required information. Otherwise you would see error like below.

C000867 CustTable.createList
Line=4, Pos=4, Xpath=/CustTable/CustTable[1] The value in field Party is invalid.Creation has been canceled.The
value ‘CFA’ in field ‘Currency’ is not found in the related table ‘Currency’.The
value ’1000′ in field ‘Customer group’ is not found in the related table ‘Customer
group table’

If you seeing the below error message then reason would be that, your number sequence for customer account would be setup as continuous. You need to change it to Manual, so that you can import customers with your defined numbers.

2
The number sequence Acco_1223 does not allow the Customer account to be
defined.

You would needs to go to Accounts Receivable/ Payable parameters. Look for the number sequence code and use View details to go to Number sequence form to Edit the specific number sequence for Customer/Vendor. Here you can change it to Manual. see the above image.

Column Party ID is very important, it is the FK record of DirPartyTable, that means the name information of the Customer would be stored in that table instead of Customer (CustTable). You also need to be sure that it should be unique for DirPartyTable records as it is PK there. If the Party ID is already there and you are trying to import it again, you may see the below error.

2 Cannot
create a record in Global address book (DirPartyTable). Party ID: 2, Radwan
Ezzeddine.The record already exists.Document Generic document could not be created. Error details: Cannot create
a record in Global address book (DirPartyTable). Party ID: 2, Radwan
Ezzeddine.The record already exists.

STEPS ARE:

Create the (CustGroup) Customer group sheet should be like that. If Customer groups are not already setup.

Customer group Description
1000 Test
1010 Test
2000 Test
3000 Test

Create record in the Currency table if the currency is not already exists in the setup table.

Create record in the DirPartyTable table, sheet should be like that. Make sure that Party ID should be unique. Name should also be created correctly as the name from here will auto pick at the customer or vendor for a Party ID

Name Party ID Party type Professional suffix
Customer1 2 Organizations MR
Customer2 19 Organizations MR
Customer3 6 Organizations MR

Create Customer sheet should be like that. If you only filling the mandatory one. You can also go with the other info if needed. If you have created records in the above setup of base tables then importing data in customer or vendor would be very easy.

Currency Customer account Customer group Name.Party ID
CFA 1 1000 2
CFA 2 1000 19
CFA 3 1000 6

If you looking for How to create worksheet to publish the customer or Vendor data. Please see below information

http://msdax.wordpress.com/2011/05/14/office-addins-dynamics-ax-2012/

http://dynamics-ax.blogspot.com/2011/10/ax-2012-excel-add-in-revisited.html


You just needs to use the Add tables option to select the tables. After that drag the required fields from Field chooser dialog. Fill the data in the fields that you have choosen, finally use the Publish option to push data into AX.

Customer or Vendor import In Dynamics ax 2012 using Office add-ins « Amir’s Microsoft Dynamics AX space

Comments are closed.