Skip to main content

Posts

Showing posts with the label form

How to Rename the Form In AX 2009 Using X++ Code?

when you create any new form in AX you need to Rename it as your business need to rename any form in AX do the following : 1- in form methods override the init method 2- write this line of code : element.design().caption("Payment"); //////////////////////////////////////////////////////////////////////////////// Example: public void init() { super(); element.design().caption("Payment"); } in caption between double quotation put any name you want

Updating the caller Form/DataSource

void updateCaller() { Common common; Object dataSource; Object caller; ; //----------------------------------- //We are notifying using the dataSource common = element.args().record(); if (common && common.isFormDataSource() && formDataSourceHasMethod(common.dataSource(), identifierstr(SomethingWasHappend))) { dataSource = common.dataSource(); dataSource.SomethingWasHappend(); } //----------------------------------- //----------------------------------- //We are notifying using the form caller = element.args().caller(); if (caller && classidget(caller) == classnum(SysSetupFormRun) && formHasMethod(caller, identifierstr(SomethingWasHappend))) { caller.SomethingWasHappend(); } //----------------------------------- } Implement the handling method in the parent form: void SomethingWasHappend() { ; info("Something was ha...