Posts

Showing posts from February, 2015

How to handle Generic Exceptions in AX

Today I will demonstrate you that how you can handle generic exceptions in AX.      Below is the example of code which we can use to handle generic exceptions:-         Static void Exception_Handler(Args _args)        {            Exception excep;            int x,y,z;            x=10;            y=0;                try                  {                      z=x/y;                       print z;                        pause;                  }                catch                  {                      info(strfmt("%1",excep));                   }                          }

How to open web site pages on AX Forms

Today I will demonstrate you that how you can show any webpage on your AX Forms. 1.   Create New Form. 2. Right click the Design node of form and add ActiveX control. 3. Select Microsoft Web Browser from AciveX control window list. 4. Go to method node of form and override Init method of form. 5. Add below line of code                 ActiveX.Navigate(" www.google.com "); Note: - ActiveX is the name of control which we have added in the form previously. 6. Now run your form and check the output