static void createVendorRecord(Args _args)
{
VendTable vendTable, vendTableRef;
DirPartyTable dirPartyTable;
ttsBegin;
VendTable.AccountNum = NumberSeq::newGetNum(VendParameters::numRefVendAccount()).num();
vendTableRef = VendTable::find(WNXParameters::find().VendorAccount);
vendTable.initValue();
vendTable.VendGroup = vendTableRef.VendGroup;
vendTable.Currency = vendTableRef.Currency;
dirPartyTable = DirPartyTable::findRec(22565449577);//Customer Master PartyId
if(dirPartyTable)
{
vendTable.Party = dirPartyTable.RecId;
vendTable.insert();
}
else
{
info("vendor not created");
}
ttsCommit;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment