Hi Everyone,
I have created Asp.net web service application project in visual studio2008 .it sucessfully created in ax 2009 table purchTable and form, but how to write read method ,can u help on this,i wrote created method in in this project like below;
public string CreatePurchaseOrder(String purchId, String purchName, String orderAccount, String invoiceAccount, String email, String currencyCode)
{
try
{
ax = new Axapta();
ax.Logon(“CEU”, “en-us”, “”, “”);
AxaptaRecord axrecord;
string tableName = “PurchTable”;
using (axrecord = ax.CreateAxaptaRecord(tableName))
{
axrecord.InitValue();
axrecord.set_Field(“PurchId”, purchId);
axrecord.set_Field(“PurchName”, purchName);
axrecord.set_Field(“OrderAccount”, orderAccount);
axrecord.set_Field(“InvoiceAccount”, invoiceAccount);
axrecord.set_Field(“Email”, email);
axrecord.set_Field(“CurrencyCode”, currencyCode);
axrecord.Insert();
}
}
catch(Exception e)
{
Console.WriteLine(“Error encountered :{0}” , e.Message);
}
return “CreatePurchOrder”;
}
}
}
thanks advance