PL-400 – Question 58

0
174

Question 58

A multinational company requires that all phone numbers be standardized as country code + area code + phone number.
The application design team decides that a custom Power Apps component framework (PCF) control should be used to prompt users for an area code and to correctly format the phone number.
You need to get the list of valid area codes when a contact record is opened and before the user enters a new phone number.
You need to get the list of valid area codes when a contact record is opened and before the user enters a new phone number.
In which function should you call webAPI.retrieveMultipleRecords?

A. updateView
B. notifyOutputChanged
C. getOutputs

Correct Answer: A
The updateView method will be called when any value in the property bag has changed. This includes field values, data-sets, global values such as container height and width, offline status, component metadata values such as label, visible, etc.
Incorrect Answers:
notifyOutputChanged is a callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously. getOutputs is called by the framework prior to a component receiving the new data. Returns an object based on nomenclature defined in manifest, expecting objects[s] for the property marked as bound.
Reference:
https://www.inogic.com/blog/2021/01/what-is-popupservice-in-powerapps-component-framework/