Sunday, June 10, 2012

ForceLiterals in axapta


ForceLiterals instructs the kernel to reveal the actual values used in the "where" clauses to the database server at the time of optimization.
This is an example of how to use this keyword.
 static void DemoForceLiterals()  
 InventTrans inventTrans;  
 while select forceliterals inventTrans order by itemId  
 where inventTrans.DatePhysical >= mkdate(21,12,2012)