QuestionQ417

Extend the user experience

You are developing a model-driven app for a company.

When you create a new Account record, you must automatically show a form to gather data that is required to create a Contact record. The form must change to the appropriate layout based on the contact type.

You open the Contact form by using JavaScript. You pass the contact type information to the form by using the Xrm.Navigation.openForm function. An OnLoad event handler in the Contact form processes the data and shows only the appropriate sections of the form for the given contact type.

You need to configure the receiving form to accept the data parameter.

Solution: Export the solution, modify the customizations.xml file, and add a querystringparameter element to the XML.

Does this solution meet the goal?

  • A Yes
  • B No
Explanation

A model-driven form can accept custom parameters passed through Xrm.Navigation.openForm when those parameters are defined in the form XML. In an exported solution's customizations.xml, adding querystringparameter elements inside a formparameters element specifies the custom parameters the form accepts.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!