Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 27 question 1 discussion

Actual exam question from Microsoft's PL-400
Question #: 1
Topic #: 27
[All PL-400 Questions]

HOTSPOT -
You need to analyze and identify the issues that solution checker identifies.
What is the missing or bad code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: Modify code at line CS102 to select only required columns
Reduce the number of columns that are retrieved.
Scenario: Error Message: il-specify-column

Symptoms -
Retrieving all columns can cause:
✑ Performance issues due to the amount of data being retrieved
✑ Unintended plug-in/process execution

Guidance -
For optimal performance, you should only select the minimum amount of data needed by your application when querying Microsoft Dataverse data.

ColumnSet Parameter -
When you use the IOrganizationService.Retrieve method set the columnSet parameter to a ColumnSet instance with specified columns. When you use
QueryExpression set the ColumnSet property with the required attributes.
Box 2: Add the following code at line CS203: request.KeepAlive =false;
Scenario: Error message: Il-turn-off-keepalive

Symptoms -
If a plug-in makes external web requests and is trying to use KeepAlive on a closed connection, the plug-in will ultimately fail to execute the web request. If the plug-in is registered:
Synchronously, users may experience:
✑ Unresponsive model-driven apps
✑ Slow client interactions
✑ The browser stops responding
Asynchronously, plug-in executions may take an extended period of time before failing.

Guidance -
In HTTP 1.1, all connections are considered persistent (KeepAlive is true) unless declared otherwise. Due to the fact that plug-ins run in isolation, the Sandbox service translates into them being short-lived executions that generally would not benefit from KeepAlive. To avoid problems with connecting to external services we recommend disabling KeepAlive within plug-ins. This is done by setting KeepAlive to false.
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/data-platform/best-practices/business-logic/set-keepalive-false-interacting-external-hosts-plugin https://docs.microsoft.com/en-us/powerapps/developer/data-platform/best-practices/work-with-metadata/retrieve-specific-columns-entity-via-query-apis

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Khella
Highly Voted 2 years, 10 months ago
First answer should be Modify code to select only specify columns.
upvoted 21 times
...
powerMaster
Most Recent 2 years, 7 months ago
Agree: Codeset1 -> first choice, Codeset2 -> first choice!
upvoted 4 times
...
nivanpee
2 years, 9 months ago
"request.KeepAlive = false" cannot be right if the error is il-turn-off-keepalive, it has to be true for the error to prompt you to turn it off
upvoted 1 times
Thota123
2 years, 8 months ago
Question is to identify the issue and suggest an action ... if the error suggests to turn-off-keepalive it must have been set to true originally which must be set to false now to remove that error So, for code set 2- Add request.KeepAlive = false; code set 1 - Modify to select only required columns
upvoted 7 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...