Berikut ini digunakan untuk melakukan insert data ke 2 company dengan menggunakan class.
Syntax nya changeCompany("HSP").
static void Create_to_2Company(Args _args)
{
AxPurchTable table;
AxPurchLine line;
;
table = new AxPurchTable();
table.parmOrderAccount('');
table.parmInventLocationId('WAREHOUSE');
table.save();
line = new AxPurchLine();
line.axPurchTable(table);
line.parmItemId('A001'); // Item number Q987
line.parmPurchQty(12); // 12 pcs.
line.save();
changeCompany("HSP")
{
table = new AxPurchTable();
table.parmOrderAccount('');
table.parmInventLocationId('WAREHOUSE');
table.save();
line = new AxPurchLine();
line.axPurchTable(table);
line.parmItemId('A001'); // Item number Q987
line.parmPurchQty(12); // 12 pcs.
line.save();
}
}
No comments:
Post a Comment