PL 400 Canvas Apps 5 — Questions and Answers
Question 1: A Canvas App needs to send an email via the Office 365 Outlook connector. Which function call is correct?
- Email.Send(to, subject, body)
- Office365Outlook.SendEmailV2(to, subject, body) (Correct answer)
- OutlookConnector.Send({to, subject, body})
- SendEmail(Office365Outlook, to, subject, body)
Correct answer: Office365Outlook.SendEmailV2(to, subject, body)
The Office 365 Outlook connector exposes SendEmailV2() as the standard action for sending emails from a Canvas App.
Question 2: What is the recommended way to share a Canvas App with all users in an organization without assigning individual licenses?
- Publish the app to Microsoft Teams
- Share with 'Everyone' in the organization and assign a Power Apps per-app or per-user plan (Correct answer)
- Export the app as a .msapp file and distribute by email
- Embed the app in a SharePoint page
Correct answer: Share with 'Everyone' in the organization and assign a Power Apps per-app or per-user plan
Sharing with the entire organization requires that each user has an appropriate Power Apps license, either per-user or per-app through Microsoft licensing.
Question 3: In Canvas Apps, which technique ensures that a collection used as a local data cache is initialized only once per session?
- Place ClearCollect() in the Button OnSelect property
- Place ClearCollect() in the App OnStart property (Correct answer)
- Place ClearCollect() in each Screen OnVisible property
- Use Collect() in a Timer control
Correct answer: Place ClearCollect() in the App OnStart property
App.OnStart runs once when the app launches, making it the correct place to initialize collections that should persist for the entire session.
Question 4: A Canvas App developer needs to display a lookup column's related table text value in a gallery. Which expression correctly shows the related 'Account Name' from a lookup field named 'PrimaryAccount'?
- ThisItem.PrimaryAccount
- ThisItem.'PrimaryAccount'.'Account Name' (Correct answer)
- LookUp(Accounts, AccountId = ThisItem.PrimaryAccountId, 'Account Name')
- Expand(ThisItem.PrimaryAccount).Name
Correct answer: ThisItem.'PrimaryAccount'.'Account Name'
In Canvas Apps connected to Dataverse, lookup field values can be expanded using dot notation to access columns from the related table.
Question 5: Which Canvas App control property would you use to conditionally apply different colors to gallery rows based on a record's Status field?
- Fill property with an If() or Switch() formula (Correct answer)
- Style property with a conditional class
- Template.Fill with a ColorValue expression
- Conditional formatting rule in the gallery settings
Correct answer: Fill property with an If() or Switch() formula
The Fill property of a control inside a Gallery can use If() or Switch() referencing ThisItem fields to dynamically change row color.
Question 6: What is the effect of setting a Canvas App's 'Explicit column selection' setting to enabled?
- Forces all columns to be loaded regardless of usage
- Only retrieves columns explicitly used in the app, improving performance (Correct answer)
- Prevents users from selecting columns at runtime
- Requires column-level security to be configured in Dataverse
Correct answer: Only retrieves columns explicitly used in the app, improving performance
Explicit column selection reduces data payload by fetching only the columns referenced in the app, improving load times and reducing data transfer.
Question 7: In Canvas Apps, what is the correct way to handle the response from a Power Automate flow that returns a JSON object with a field named 'orderNumber'?
- FlowResponse.orderNumber
- ParseJSON(FlowResponse).orderNumber
- Set(result, MyFlow.Run()); result.orderNumber (Correct answer)
- JSON(MyFlow.Run()).orderNumber
Correct answer: Set(result, MyFlow.Run()); result.orderNumber
The .Run() method returns the flow's output as a record; storing it in a variable with Set() and then accessing its fields is the standard pattern.
A Canvas App needs to send an email via the Office 365 Outlook connector.
Which function call is correct?