Showing posts with label Simple Find Method in Ax 2012. Show all posts
Showing posts with label Simple Find Method in Ax 2012. Show all posts

Monday, 7 May 2018

Simple Find Method in Ax 2012

//Creating Find Method In Ax 2012
static InventTable find(ItemId itemId,boolean update = false)
{
InventTable inventTable;
inventTable.selectForUpdate(update);

if (itemId)
{
           select firstonly inventTable
          index hint ItemIdx
          where inventTable.ItemId == itemId;
}
return inventTable;
}