PL-400 Exam QuestionsBrowse all questions from this exam

PL-400 Exam - Question 198


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 an event handler for the data parameter.

Does the solution meet the goal?

Show Answer
Correct Answer: B

To configure a model-driven app form to accept data parameters, you should use the form properties or edit the form XML to specify which query string parameters will be accepted. Adding an event handler for the data parameter in the form editor is not the correct approach. This method will not achieve the goal of properly accepting and processing the data parameter passed through Xrm.Navigation.openForm.

Discussion

11 comments
Sign in to comment
DimpleGOption: A
Jan 27, 2024

In order to pass the contact type information to the Contact form, you can use the Xrm.Navigation.openForm function which allows you to pass additional parameters along with the form. By adding an event handler for the data parameter in the Contact form, the form will be able to process the data and show only the appropriate sections of the form for the given contact type. This will meet the requirement of automatically displaying a form to collect data that is needed to create a Contact record and switch to the appropriate form layout based on the contact type. It's important to note that the event handler for the data parameter should be added in the form editor, and it should be able to process and handle the data passed to it.

L_2020
Jul 12, 2023

Makes no sense to pass an event handler for the data parameter to accept the data parameter, we could use the form properties parameters here instead

Kalimho
Jul 21, 2023

in exam 2022.07.21

jkaur
Aug 17, 2024

No should be

HasanAamir11Option: B
Sep 8, 2024

The given answer No is correct

Juan0414Option: B
Mar 5, 2025

For me the wording in the solution does not have any sense, as you can not add an event handler "FOR" the data parameter. You can say something like "add an event handler for the OnLoad event that processes the data parameter". So, for me is No

Whataboutno
Mar 5, 2023

Is it correct?

UieyOption: B
Jun 21, 2023

Yes, I guess the given answer is correct. You don't want to pass an event handler for the data parameter.

Juan86Option: A
Sep 13, 2024

Answer:A. Since we can use the event handler to communicate the data parameter info

OlenaChepOption: B
Feb 27, 2025

Xrm.Navigation.openForm(entityFormOptions, formParameters).then(successCallback, errorCallback) According to documentation there are two ways to specify which query string parameters will be accepted by the form: Edit form properties and Edit form XML. https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/configure-form-accept-custom-querystring-parameters

itmaxuserOption: B
Apr 14, 2025

Access Parameters on the Target Form On the receiving form, you need to write JavaScript to read those parameters during form load. Typically, this goes in a form OnLoad event handler: