exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 5 question 13 discussion

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

DRAG DROP -
An organization has a Dynamics 365 Sales environment.
You need to create a Power Apps component.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Run pac pcf init ג€"namespace ..
This is the first command which creates basic folder structure of PCF control project.
Run the following command to create the control. The format of the control is: pac pcf init ג€"namespace <specify your namespace here> ג€"name <put component name here> ג€"template <component type>
Step 2: Run the npm install command

Install Dependencies -
Once 'init' sets up the basic folder, as a next step install all the PCF control dependencies using 'npm install' command.
Example:

Now at this point, there is nothing we have actually created. However, the solution created contains sample PCF control code.
Step 3: Run the following np run build command
Build PCF Component.
Once you implement the PCF component, build the code for any syntax errors.
Syntax:
npm run build

Reference:
https://rajeevpentyala.com/2020/03/21/power-apps-component-framework-pcf-demystify/ https://carldesouza.com/creating-a-custom-component-using-the-powerapps-component-framework/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
igor_luan13
Highly Voted 4 years, 3 months ago
The Correct is: Create a project folder Run the pact pcf init Run the npm install command https://docs.microsoft.com/en-us/powerapps/developer/component-framework/create-custom-controls-using-pcf
upvoted 93 times
yuko17
1 year, 11 months ago
I agree with igor_luan13's post Answer: Create a project folder. Run pact pcf init. Run the npm install command. The pact pcf init command in question does not include "--run-npm-install". Therefore, "npm install" must be run again.
upvoted 3 times
...
powerMaster
3 years, 1 month ago
the install command is included in the init, so you do not need to call it again. rather call the build at the end
upvoted 3 times
ryanzombie
8 months, 1 week ago
No, just tried it, the install command is NOT included in the init. The pac pcf init command explicitly tells you to run npm install right after it runs. Running: `pac pcf init --namespace samplens --name mycontrol --template field` Returns the following: `The Power Apps component framework project was successfully created in 'C:\Users\iamroot\source\repos\test'. Be sure to run 'npm install' or equivalent in this directory to install project dependencies.` ...and indeed the node_modules folder is only created after npm install is explicitly called.
upvoted 1 times
...
...
Thota123
3 years, 3 months ago
According to the above link 'pac pcf init' command also runs the 'npm install' command ... so the third step should be to build which .i.e. step 3 - 'npm run build'
upvoted 7 times
LorneMalvo
2 years, 9 months ago
I think there must be error in the above link. I just tried running the 'pac pcf init' command and it didn't install anything even though I have latest version of pac installed. So igor_luan13's answer is correct
upvoted 2 times
...
crismadalina
3 years, 2 months ago
The request is to create the component,not to build. And between create and build there are needed some code implementation. So I am agreeing that the order is 1.Create a project folder 2.Run the pact pcf init 3.Run the npm install command
upvoted 4 times
...
DeVries
3 years, 1 month ago
Agree. The steps are literally described in the link https://docs.microsoft.com/en-us/powerapps/developer/component-framework/create-custom-controls-using-pcf 1. Create folder 2. npm pcf init 3. rpm run build Other combination does not make sense. e.g. npm pcf already runs npm install.
upvoted 9 times
...
...
...
majklik
Highly Voted 3 years, 11 months ago
Order is correct. There is newer version of Microsoft steps here https://docs.microsoft.com/en-us/learn/modules/get-started-component-framework/3-tooling
upvoted 17 times
SashM
2 years, 3 months ago
This is correct one. Other reference looks like for Microsoft Power Platform CLI Component. https://docs.microsoft.com/en-us/learn/modules/get-started-component-framework/3-tooling is correct reference for the Power apps component.
upvoted 1 times
...
...
itmaxuser
Most Recent 3 weeks, 2 days ago
The correct three actions to create a Power Apps component (PCF control) are: 1-Create a project folder You need a dedicated workspace for your component. 2-Run the pac pcf init --namespace SampleNamespace --name ControlName --template field command This initializes the PCF control project inside your folder. 3-Run the npm install command This installs all required packages and dependencies for the component.
upvoted 1 times
...
Juan0414
2 months ago
The order is: Create a project folder Run pac pcf init Run npm install https://learn.microsoft.com/en-us/power-apps/developer/component-framework/create-custom-controls-using-pcf#create-a-new-component
upvoted 1 times
...
4e8b388
1 year ago
1) Create a project folder. 2) Run the pac pc init --namespace SampleNamespace --name ControlName template field command 3) Run the following nom run build command.
upvoted 2 times
...
Hinacle
1 year ago
Read the options carefully, the pac pcf init did not include npm install command like microsoft document. So you have to run npm install manually
upvoted 1 times
...
uberlord
1 year, 8 months ago
given answer is correct as per https://learn.microsoft.com/en-us/training/modules/get-started-component-framework/3-tooling
upvoted 1 times
...
jkaur
1 year, 8 months ago
Create a project folder Run the pact pcf init Run the npm install command
upvoted 1 times
...
anotherlameaccount
1 year, 10 months ago
in the DOC : https://learn.microsoft.com/en-us/power-apps/developer/component-framework/create-custom-controls-using-pcf you have the pac pcf -init with --run-npm-install at the end. This is missing from the command in the question. 3rd step is npm install
upvoted 2 times
...
PGG
2 years, 5 months ago
So nice when official documentation just contradicts each other... NO need of npm i ->https://docs.microsoft.com/en-us/powerapps/developer/component-framework/create-custom-controls-using-pcf NEED of npm i -> https://docs.microsoft.com/en-us/learn/modules/get-started-component-framework/3-tooling
upvoted 1 times
...
HelenJose
3 years, 5 months ago
Correct Order : Create a Project Folder run pac pcf init (command will also run npm install command for you to retrieve all the required project dependencies) npm run build command Ref : https://docs.microsoft.com/en-us/powerapps/developer/component-framework/create-custom-controls-using-pcf
upvoted 15 times
...
Paul21534
3 years, 7 months ago
Answer looks correct: https://docs.microsoft.com/en-us/learn/modules/get-started-component-framework/4a-demo
upvoted 2 times
...
Aedu
3 years, 8 months ago
I think problem is that we don't know if MS has updated the correct answer after they indroduced pac init with automatic call of npm install. PL-400 is quiet old now. Do you have any ideas?
upvoted 5 times
...
BunkMoreland
3 years, 8 months ago
Correct answer is : Create project folder Run pac pcf init Run npn install
upvoted 2 times
...
stooperda101
3 years, 9 months ago
according to the below, pcf inti will also run npm install automatically, so 1. create folder, 2. pcf init 3. npm run build
upvoted 9 times
ETU69
3 years, 6 months ago
I agree. https://docs.microsoft.com/en-us/powerapps/developer/component-framework/create-custom-controls-using-pcf
upvoted 2 times
...
...
Daniel1992
3 years, 11 months ago
I think the question missed the word Framework. The are two things, Power Apps Components and Power Apps Components Framework (PCF)
upvoted 2 times
...
ripperCrew
4 years, 3 months ago
I think since running the PAC PCF Init command already creates the project folder there is no need to create a Project Folder by yourself
upvoted 8 times
Mnarmeen
4 years, 1 month ago
Yes it does, but the Microsoft docs also mentions to create a new project folder and then navigate to it and run the commands. https://docs.microsoft.com/en-us/powerapps/developer/component-framework/create-custom-controls-using-pcf
upvoted 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago