Skip to Content

PL-400: Which Function Determines Form Type in Model-Driven Apps Using Client Scripting?

How to Use formContext.ui.getFormType for Event Handling in Power Platform?

Table of Contents

Question

You are developing a model-driven app.

You need to use client scripting to extend the app.

You need to determine the form type when an event handler is called on a form.

Which function should you use?

Select only one answer.

A. ExecutionContextObj.getEventArgs();
B. ExecutionContextObj.getEventSource();
C. ExecutionContextObj.getFormContext();
D. formContext.ui.getFormType();

Answer

D. formContext.ui.getFormType();

Explanation

This item tests the candidate’s knowledge of model driven apps using client-side scripting and event handlers.

The formContext.ui.getFormType(); function helps to determine when an event handler is called and from which form type. The ExecutionContextObj.getEventArgs(); function returns an object with methods to manage the events.

The ExecutionContextObj.getEventSource(); function returns the object from the xrm object model that is the source of the event. The ExecutionContextObj.getFormContext(); function returns a reference to the form or an item on the form depending on where the method was called.

Microsoft Power Platform Developer PL-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Power Platform Developer PL-400 exam and earn Microsoft Power Platform Developer PL-400 certification.