Configuring Query String Parameters in Model-Driven App Forms

Apply business logic in model-driven apps by using client scripting
Answer Correct 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.

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might 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?

  1. Yes Correct Answer
  2. No

Community Insight

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.

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.

Community Discussion (9 comments)

Cristinedda 👍 1 Selected: A
In a Microsoft Dynamics 365 model-driven app, you can configure a form to accept custom parameters passed through Xrm.Navigation.openForm()
KonradNowak00 👍 1 Selected: A
Yes it is relevant
5f14337 👍 2 Selected: B
Adding 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 Selected: A
When editing a form in the old interface, there is a button "form properties" where query parameters can be added.
abcthv 👍 1
I 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
NyarukouSAMA 👍 2 Selected: A
Due to the link provided in the description, we indeed need to configure the query string parameter on the form.
DimpleG 👍 3 Selected: B
The 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.
lesiris 👍 1
This set of questions was in my exam (28/07/2022)
shibax 👍 5
correct

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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?

It registers the parameter in the form's metadata, allowing client-side scripts to access the value during the OnLoad event.

Does Xrm.Navigation.openForm use query strings?

Yes, when passing parameters, they are often serialized into the URL/query string for the target form to read after configuration.

More PL-400 FAQ →

Related Analysis

Practice All PL-400 Questions

Access 85 questions with complete answers and detailed explanations.

View Full PL-400 Practice Test →

← Back to PL-400 Study Guide