February 20 2017
To import The Excel Data’s into AX we can use Addin’s Techniques,But it is quite a wrecking scenario that the process could not be accessed perfectly in Batch .The Following were the steps while trying to Import Excel Datas into AX.
* Create a Web Based Console Application,because it acts as a Bridge between Data Import into Dynamics AX.
* Create a Excel Document which iterates the Data’s into AX.Make sure about the File Directory Path ,if it doesn’t matches then the Entire Deployment will be Solicit,to further for the Next.
* Once your application is ready make the application to run in the .DLL File Format.
* It happens only if the Output Type of the Console Application is said to be Run on Class Library.Save the .DLL File both in the Global Assembly Cache & System Document Folder.(mainly on Client/Server Bin Folder).
* In Microsoft Dynamics AX ,there is a way to access the Library Files using Reference Menu Item.Basically, Reference Menu Item is mainly used to Invoke the Dotnet Application.
* Add the Reference .DLL File,so that the Classes and Functions can be assessed any where in the AOT (Application Object Tree).
* To run the Application through Batch Process ,Create a Class to extend it through RunBaseBatch .
* Public Accesser is used mainly to inherit the datas into the Overall Application ,which is widely present in the CodePlex.
* Program.XlReader.RetrieveFromXL ---Acts as a Invoker to run the application from DotNet Application into AX .
* Once the above process seems to get complete,We can Import it into AX. Set the Recurrence to be perfectly matched with the progress.
*// To fetch current selected company of AX 2009 in .Net through .Net Business Connector.
currentRecord = (AxBaseWebPart.GetWebpart(this)).ExternalRecord
static void JobAddFieldsToFieldGroup(Args _args)
TreeNode treenodefieldgroup,tablenodeautoreport, tablenodeanyfield ;
TreeNode tablenode = TreeNode::findNode(#TablesPath).AOTfindChild("Demo_table");
//Get the fields group node under the table node
treenodefieldgroup = tablenode.AOTfindChild("Field Groups");
//Here i am adding a field test to AutoReport field group
tablenodeautoreport = treenodefieldgroup .AOTfindChild("AutoReport");
//Check if that field is already present in that field group
tablenodeanyfield = tablenodeautoreport .AOTfindChild("Test");
//add if it is not added