Saturday, May 7, 2016

AX 2012 - how to use 'NOT LIKE' in AX statements

Please note that I am using ! after 'where' keyword to reverses the effect of 'like' 

static void Not_Like(Args _args)
{
    #define.createdBy('faisal')
    InventTable     inventTable;
   
    while select inventTable
        where !(inventTable.ItemId like 'I*')
    {
        // do your logic  
    }

}