Unable to open sales order form! Weird Error.

When i try to open sales order in accounts receivable, AX stops working.

When i try doing the same by going to AOT → Forms → Sales table, i get the following error:

Error executing code: FormTabPageControl object does not have method ‘lookupButton’.

Stack trace

(C)\Classes\FormTabPageControl\lookupButton
(C)\Data Dictionary\Tables\TaxVATNumTable\Methods\enableLookupVATNum - line 5
(C)\Forms\SalesTable\Methods\init - line 111
(C)\Classes\SysSetupFormRun\init - line 3

Please help me…

It means that you have a bug in the init() method. The object you send to TaxVATNumTable::enableLookupVATNum() must be a FormStringControl, not a FormTabPageControl.