Thursday, May 24, 2012

Dynamics AX 2012 x++ Enhancement, Now variables can be used in Selects


Now you can use the variables in the selects. scenario is that suppose you trying to copying bulk records in a table and one of the column you wanted is constant. like below i am trying to insert Fiscal periods records for a Ledger where record id of the ledger is Constant, so i took that in a variable and i am using it in the select.
RecId _ledgerRecId = Ledger::Current();
insert_recordset ledgerFiscalCalendarPeriod
(
Ledger,
FiscalCalendarPeriod,
Status
)
select _ledgerRecId, RecId, status

No comments:

How to identify the user that was used to change an object from AOT in AX2012

Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...