最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

[转]Data import error in Microsoft Dynamics AX 2012 using Dynamics AX Add-ins for Microsoft Office Excel

AX 2012 William 2801浏览 0评论

原文地址:http://eprogrammers.blogspot.com/2011/12/data-import-error-in-microsoft-dynamics.html

This article explains: 
How to resolve data import error for Microsoft Dynamics AX 2012 using Office Add-ins. This error happens when you try to import data from excel to Dynamics AX. 

Applied on: 
Microsoft Dynamics AX 2012 CU2. 

Symptom: 
When you try to import data for LogisticsAddressCity, LogisticsAddressZipCode, LogisticsAddressState etc. you get an error “Cannot load [LogisticsAddressCity]. Tables must have a valid replacement key or a primary index other than RecID for use in Office Add-ins”. 

 

Reason: 
The main reason of this error is missing of primary index which is responsible for unique record in your table. 

Solution: 
Step 1
: Open your AX client and go the AOT / Data Dictionary / Tables then LogisticsAddressCity table. 
Step 2: Go the indexes of above mentioned table and create a new index. 
Step 3: Assign fields CountryRegionId, Name and RecId to this new index. Save your work. Here CountryRegionId and Name both are mandatory fields for this table so added in primary index and additionally RecId has been added to make the record unique in the table. 
Step 4: Select newly created index and go to property of the index. Set property for Allow Duplicates = No; Alternate Key = Yes 
Step 5: Save your work and select table LogisticsAddresssCity. Go to property of this table and set newly created index to Replacement Key property. Save your work. 

Please repeat step 2 to 5 for other tables you got error. Select mandatory fields and RecId in their index. 
Step 6: Right click on these tables and synchronize them one by one. 
Step 7: Select all these customized tables and generate CIL. You can use Ctrl + Shift + F7 to generate CIL for selected tables. If CIL is generated correctly you will get output messages like: Finished Pass 1 at [date & time], Finished Pass 2 at [date & time], Finished Pass 3 at [date & time]. 
Step 8: Once all these are done, restart your application AOS. Once the AOS is restarted, run your AX client and try to import data. 

Hope this will resolve your problem. 
Happy learning 🙂 

NOTE: Use at your own risk. There is no warranty on this article.

转载请注明:ww12345678 的部落格 | AX Helper » [转]Data import error in Microsoft Dynamics AX 2012 using Dynamics AX Add-ins for Microsoft Office Excel

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址