Integrate VS 2008 (C#) with Axapta 2009.

Hello All,

I need a help on integrate VS 2008 (C#) with axapta 2009.

actually my requirement is to insert the data in axapta table through C# page…

if u have any thing on that or any readymade page then plz share with me or Send on

my email id : moazzam@octaware.com

Thanks in advance…

You need to use Business Connector for this. Get the book Inside Microsoft Dynamics Ax 2009 or tutorial development materials .

Thanks Friend,

But did u have any sample code for inserting data from c# page to axapta database.

If u have then plz share it …

my email id is moazzam@octaware.com

Thanks…

using Microsoft.Dynamics.BusinessConnectorNet;

// Create the .NET Business Connector objects.
Axapta ax;
AxaptaRecord axRecord;
string tableName = “AddressState”;

try
{
// Login to Microsoft Dynamics AX.
ax = new Axapta();
ax.Logon(null, null, null, null);

// Create a new AddressState table record.
using (axRecord = ax.CreateAxaptaRecord(tableName));
{

// Provide values for each of the AddressState record fields.
axRecord.set_Field(“NAME”, “MyState”);
axRecord.set_Field(“STATEID”, “MyState”);
axRecord.set_Field(“COUNTRYREGIONID”, “US”);
axRecord.set_Field(“INTRASTATCODE”, “”);

// Commit the record to the database.
axRecord.Insert();
}
}
catch (Exception e)
{
Console.WriteLine(“Error encountered: {0}”, e.Message);
// Take other error action as needed.
}

Source: http://msdn.microsoft.com/en-us/library/aa868997.aspx

You can refer the following link:

http://www.packtpub.com/article/working-with-microsoft-dynamics-ax-and-net-2

Topic:Insert data into an AX table