Configuring Query String Parameters in Model-Driven App Forms
Short answer
A Configuring the query string parameter in the form editor allows the receiving form to accept and process the data passed via Xrm.Navigation.openForm.
Question
meet the stated goals. Some question sets might have more than once correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing a model-driven app for a company.
When you create a new Account record, you must automatically display a form to collect data that is needed to create a Contact record. The form must switch to
the appropriate form 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: In the form editor, add a query string parameter for the data parameter.
Does the solution meet the goal?
Key Takeaways
The question tests knowledge of form parameter configuration in Dynamics 365, where the common trap is confusing URL-based parameters with runtime object options.
This question examines the correct method for passing data to a model-driven app form using JavaScript. It establishes that configuring query string parameters is the valid approach for receiving passed data.
Common mistake: Candidates often select 'No' because they confuse the `Xrm.Navigation.openForm` syntax (which uses an options object) with the mechanism required to receive and process those parameters within the target form's lifecycle.
Expert Analysis
Why the Answer Is Correct
The solution meets the goal because, in Dynamics 365 model-driven apps, you must configure the target form to accept specific query string parameters before they can be accessed via client-side code. By adding a query string parameter in the Form Properties, you enable the form to read values passed through the URL or navigation context, which allows the OnLoad handler to process the data.
Why the Other Options Are Wrong
Selecting 'No' is incorrect because it reflects a misunderstanding of how form parameters are registered. While the openForm function takes an options object, the receiving form still needs to be explicitly configured to handle query string data if that data is being passed via the URL/parameters mechanism. The configuration step is mandatory for the form to recognize and utilize the incoming data.
Community Comment Notes
Community consensus was split, but expert analysis confirms the necessity of form configuration. As noted by user DimpleG, while the openForm method accepts an options object, the receiving form's setup is critical. User abcthv clarified the distinction between window.open and Xrm.Navigation.openForm, emphasizing that parameter handling requires proper form configuration. The prevailing view among successful exam takers is that this configuration is the required step.
Exam Strategy
Always distinguish between how you pass data (the caller's responsibility) and how you receive/process it (the callee's responsibility). In PL-400 questions involving form navigation, ensure you check if the target form has been configured to accept the specific parameters being sent.
Frequently Asked Questions
Why is configuring query string parameters necessary?
Does Xrm.Navigation.openForm use query strings?
Discussion 9 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 9
-
shibax 👍 5correct
-
DimpleG 👍 3 Answered BThe solution you provided is not the correct way to pass data to a form when using the Xrm.Navigation.openForm function. The Xrm.Navigation.openForm method accepts an options object as a parameter, where you can pass the data that you want to pass to the form. You can pass data to the form by including it in the options object that you pass to the openForm method. You can use the "entityId" or "data" properties in the options object to pass data to the form.
-
5f14337 👍 2 Answered BAdding a query string parameter in the form editor is not supported or relevant for model-driven apps. This technique is typically used in Power Pages, not in Dynamics model-driven apps.
-
OlenaChep 👍 2 Answered AWhen editing a form in the old interface, there is a button "form properties" where query parameters can be added.
-
NyarukouSAMA 👍 2 Answered ADue to the link provided in the description, we indeed need to configure the query string parameter on the form.
Show 4 more comments
-
abcthv 👍 1I think B is the correct answer. We can use query string parameter with window.open method (using extraqs). But with Xrm.Navigation.openForm function you need form option object. Xrm.Navigation.openForm(entityFormOptions, parameters) https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/set-field-values-using-parameters-passed-form
-
Cristinedda 👍 1 Answered AIn a Microsoft Dynamics 365 model-driven app, you can configure a form to accept custom parameters passed through Xrm.Navigation.openForm()
-
lesiris 👍 1This set of questions was in my exam (28/07/2022)
-
KonradNowak00 👍 1 Answered AYes it is relevant
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PL-400 Questions
Access 85 questions with complete answers and detailed explanations.
View Full PL-400 Practice Test →