How to entering Sales Lines by bar code in AX 2012

In AX 2012, we only choose bar code after we have item id on sales line.













This is a simple code to show you how to chose bar code and auto bring item id and product dimension to sales lines:
Comment this code in class SalesTableForm method adjustLineAccessBasedOnItem






Comment this code in Form SalesTable method setReturnFields




Overide method modified of BarCode field in SalesLine datasource