I have a requirement that i need to create a transfer order using the c-sharp application. I can connect and insert the records in the AX database its working but its not working when i goto create the transfer order.
I read on the Internet that we can use 2 classes axInventTransferTable, axInventTransferLine.
I am using the axInventTransferTable class to test and create the header record. I am using the following code but its not doing any thing at all.
private void button3_Click(object sender, EventArgs e)
{
Axapta ax;
AxaptaObject axobj;
string s1, s2;
try
{
ax = new Axapta();
ax.Logon(null, null, null, null);
{
ax.TTSBegin();
using (axobj = ax.CreateAxaptaObject(“axInventTransferTable”))
{
s1 = “34”;
s2 = “Store1”;
axobj.Call(“parmInventLocationIdFrom”, s1);
axobj.Call(“parmInventLocationIdTo”, s2);
axobj.Call(“parmShipDate”, “9/16/2011”);
axobj.Call(“Save”);
// str3 = axaptaobject.Call(“parmTransferId”).ToString();
}
ax.TTSCommit();
ax.Logoff();
MessageBox.Show("Transfer Order Inserted … ");
}
}
catch (Exception err)
{
Console.WriteLine(err.Message);
}
}
Please if any one already done this share the code.
Thanks and regards.