Skip to main content

Notifications

Dynamics 365 Community / Blogs / The Dynamics 365 Library / Passing parameters to anoth...

Passing parameters to another form and open it in Edit mode

Faisal Fareed Profile Picture Faisal Fareed 10,794 User Group Leader
Below code can be used to pass one parameter from one form to another and open that form in Edit mode.

Args            args;
str             defaultFormOnTable;
MenuFunction    menuFunction;

args = new Args();
args.record(CustTable::find(‘test account’));

menuFunction = new MenuFunction(menuitemDisplayStr(CustTable), MenuItemType::Display);

if(menuFunction)
{       
   menuFunction.openMode(OpenMode::Edit);
   formRun = menuFunction.create(args);
   if(formRun)       
      formRun.run();     
}

In this example I opened customers form in Edit mode by passing customer account 'test account'as a parameter.

Comments

*This post is locked for comments