Skip to main content

Posts

Code for Inventory Transfer order posting in MSD axapta

If you want to post Transfer order for shipment or receive at runtime then this code can help you. You need to use InventTransferParmTable object and InventTransferUpdShip class object to do the same. InventTransferParmTable inventTransferParmTable; InventTransferTable inventTransferTable; inventTransferUpdShip inventTransferUpdShip; ; select inventTransferTable where inventTransferTable.TransferId =='00140_080'; inventTransferParmTable.clear(); inventTransferParmTable.initParmDefault(); inventTransferParmTable.ParmId = RunBaseMultiParm::getSysParmId(); inventTransferParmTable.TransferId =inventTransferTable.TransferId; inventTransferParmTable.UpdateType = InventTransferUpdateType::Shipment; inventTransferParmTable.ShipUpdateQty = InventTransferShipUpdateQty::ShipNow; inventTransferParmTable.ExecutedDate = systemdateget(); inventTransferUpdShip = InventTransferUpdShip::newParmBuffer (inventTransferParmTable); inventTransferUpdShip.ru

Get Value from table by using relation in query build datasource in MSD axapta

ReqTrans reqTrans; ReqPo reqPo; Query query; QueryBuildDataSource qbds; QueryBuildRange qbr; QueryRun qr; ; query = new Query(); qbds = query.addDataSource(tablenum(ReqPO)); qbds.addDataSource(tablenum(ReqTrans)).relations(true); qr = new QueryRun(query); while(qr.next()) { reqPo = qr.get(tablenum(ReqPO)); reqTrans = qr.get(tablenum(ReqTrans)); info(reqPo.RefId); }

Inventory Transactions table for Inventory modules in MSD Axapta

a) If Item is created using item master module (Inventory Management->Items) then Records get created in inventTable. b) If Sales Order created then Records get created in SalesTable and Sales Line table after confirmation, packing slip and invoicing orders records get created in other tables like custpackingSlipJour,CustPackingSlipTrans custInvoiceJour,CustInvoiceTrans,InventTrans etc. c) If Purchase Order is created then Records get created in PurchTable and PurchLine table after confirmation , packing slip and invoicing of order records get created in VendpackingslipJour,VendPackingSlipTrans,VendInvoiceJour,VendInvoiceTrans, InventTrans etc. d) If Inventory Movement Journal is created then Record get created in InventJournalTable and InventJournalTrans after posting of journal Records updated in invetTrans table. e) Financial Journal created in LedgerJournalTable and LedgerJournalTrans after posting Journals information Stored in LedgerTrans table.

Validate Ledger Journal By Code in MSD Axapta

To Validate Ledger Journal By Code in Axapta You can try following code. LedgerJournalCheckpost _ledgerJournalCheckpost; LedgerJournalTable _LedgerJournalTable; ; _LedgerJournalTable=LedgerJournalTable::find('004458/JV); _LedgerJournalCheckPost =LedgerJournalCheckPost::newLedgerJournalTable (_LedgerJournalTable,NoYes::No); _LedgerJournalCheckPost.run(); Same code you can use for Journal Posting. You need to change only following line. (_LedgerJournalTable,NoYes::Yes);

Create and send alert to user in MSD Axapta by code

EventInbox is a table where alert message record stored. You can try following code to check the same using job in axapta. static void CreateAlertInAx(Args _args) { Eventinbox Alerbox; ; Alerbox.initValue(); Alerbox.ShowPopup = NoYes::Yes; Alerbox.Subject = "This is the Alert subject"; Alerbox.Message = "This is the Alert message"; Alerbox.AlertedFor = "This alert is just information testing"; Alerbox.SendEmail = false; Alerbox.UserId = curuserid(); Alerbox.TypeId = classnum(EventType); Alerbox.AlertTableId = tablenum(Address); Alerbox.AlertFieldId = fieldnum(Address, Name); Alerbox.TypeTrigger = EventTypeTrigger::FieldChanged; Alerbox.CompanyId = curext(); Alerbox.AlerboxId = EventAlerbox::nextEventId();; Alerbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime(); Alerbox.insert(); }