Skip to main content

Posts

TTSBEGIN TTSCOMMIT Error in MSD axapta

You may found an error while posting inventory journal (Inventory Counting, Inventory Transfer etc.) if you enable ModifiedDateTime property on InventJournalTrans or Inventory journal related tables. It throws following error. The operation cannot be completed, since the record was not selected for update. Remember TTSBEGIN/TTSCOMMIT as well as the FORUPDATE clause.  It should not throw error if it's only standard code and no customization is there. But the reason of this type of error is that somewhere update on record has been performed without selecting for forupdate clause or without locking the table. best way to know put a break point in info class and debug. There no single change in codes.you set the InventjournalTrans table ( I am not sure it was InventJournalTrans or inventTransPosting ) property ModifiedDateTime as YES and from one blog you can got the clue that It may happening because of this property. After removing this property it may work fine. apparently i

Closing stock of items datewise in MSD axapta

Sometimes we need to to find the Stock of Item by Date. You can set following code in for or while loop to get closing stock for all items in tables. You can get posted,recieved and deducted qty. screeshot of code is as above.

Tables which included in purchase order posting in MSD axapta

These are Tables which included in purchase order posting in axapta. These are main table of purchase order posting. InventTrans is common table for all type of inventory related transactions. PurchTable PurchLine PurchParmTable PurchParmLine InventTrans VendInvoiceJour VendInvoiceTrans VendInvoicePurchLink VendTrans VendTransOpen LedgerTrans TaxTrans TaxTrans_In

Clear User AUC cache file for all users in MSD axapta by code

Some times user face problem with axapta client instance startup then you need to clear cache file of user profile. .Auc file is right things to clear. You can delete it manually or by code for all users following way. #AiF SysSQMSettings _sysSQMSettings; ; ttsbegin; update_recordset _sysSQMSettings setting GlobalGUID = str2Guid(#EmptyGuidString); ttscommit; You need to restart AOS after running above code through job.

Create copy of movement journal entry by code in MSD axapta

To Create copy of movement journal entry by code in axapta you can try following code hint and can apply in loop also to create large number of entries. InventJournalCopy _InventJournalCopy = InventJournalCopy::construct(); _InventJournalCopy.getLast(); _InventJournalCopy.parmJournalIdFrom('JournaNum'); _InventJournalCopy.run();