web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

How to open another form by code from jumpRef() function. #ax #dynamics #d365

Krishna Bhardwaj Profile Picture Krishna Bhardwaj 97

Hi there, I'm going to show how to open another form by code from jumpRef() function. 

I created one fact box and my task was to open another form if used click on the field's value hyperlink.

 

// Using FormRun

     public void jumpRef()

        {

            Args        args;

            FormRun     formRun;

            args = new Args(formstr(ProdRoute));

            args.record(ProdRoute::find(ProdRoute.ProdId, ProdRoute.OprNum, ProdRoute.OprPriority));

            formRun = classfactory.formRunClass(args);

            formRun.init();

            formRun.run();

            formRun.detach();

        }

 

// Using MenuFunction

   public void jumpRef()

        {

            Args        args;

            MenuFunction menuFunction;

            args = new Args();

            args.record(ProdTable::find(ProdTable.ProdId));

            args.caller(element);

            menuFunction = new MenuFunction(menuItemDisplayStr(ProdTableListPage), MenuItemType::Display);

            menuFunction.run(args);

        }

Comments

*This post is locked for comments