Passing parameters to another form and open it in Edit mode

Passing parameters to another form and open it in Edit mode

MCP · Azure DevOpsYour delivery board, readable by an agentMCP · DataverseOne consent, and the data layer opensMCP · Dynamics 365 F&OConnecting F&O to an agent Microsoft hasn’t documented
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.
Previous article← How to validate Email and URL through X++
Discussion

Ask a question or leave feedback

This is a review interaction. The WordPress version will store, thread and moderate comments.

Thanks — submitted for moderation in this review.
Search the whole site · Ctrl/⌘ + K