cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MinhPham96
Helper III
Helper III

Cannot add Custom Component to Entity

Hello, I am new to PCF, I tried the following this example to create a custom component, it works. 

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/data-set-gr...

 

I was able to package the component and deploy it to my environment 

1.png

 

i followed this tutorial to add the component to an entity but i could not see the custom component in Add Control 

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/add-custom-controls-to-a-fi...

 

2.png3.png

 

I hope somebody can help me, thank you for reading. 

 

Best Regards, 

 

Minh Pham 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @MinhPham96 ,

Please consider select the Forms you want to add your Custom component within the Solution explorer, then edit it as below:

1.JPG

Then within the opening Entity Form, select the field where you want to add your Custom Component, then click "Change properties" option as below:

2.JPG

Then switch to "Controls" tab, click "Add control", check if the Custom Component is existed there.

 

Also please make sure the Entity you are expanding is in same Solution as your imported Custom Conponent package.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
MinhPham96
Helper III
Helper III

Ok, It was actually shown in the 'Add Control' list, but it was displayed in a different name. So can somebody help me where the name is defined ? Because the display name is different from the project name, as well as the namespace, I cannot remember where we defined this name. Thank you for reading.

 

 2019-11-29_09-30-22.png

 

Best Regards, 

 

Minh Pham

v-xida-msft
Community Support
Community Support

HI @MinhPham96 ,

Please consider select the Forms you want to add your Custom component within the Solution explorer, then edit it as below:

1.JPG

Then within the opening Entity Form, select the field where you want to add your Custom Component, then click "Change properties" option as below:

2.JPG

Then switch to "Controls" tab, click "Add control", check if the Custom Component is existed there.

 

Also please make sure the Entity you are expanding is in same Solution as your imported Custom Conponent package.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MinhPham96
Helper III
Helper III

Dear @v-xida-msft ,

 

Thank you for your reply, but I already updated the situation in my second comment, can you have a look at it for me ? Thank you. 

 

Best Regards,

 

Minh Pham 

Hi @MinhPham96 ,

Actually, the displayname of the Custom Code Component is defined within the Manifest.Input.xml file for your code component as below:

4.JPG

 

If you want to change the DisplayName of your Custom Component, please update the corresponding Manifest.Input.xml, then update your Custom Component again.

 

The Manifest.xml file of your custom component should be like below:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/data-set-gr...

Please consider update the Manifest.xml file on your side.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MinhPham96
Helper III
Helper III

Dear @v-xida-msft ,

 

I did a quick check and found out that the display name is defined in a web resource file. This web resource file is within the sample code which it uses the display name key from the Manifest to get the value from the web resource file 

2019-11-29_11-34-43.png2019-11-29_11-33-57.png

2019-11-29_09-30-22.png

 

I just want to clarify a bit more, Is it possible for us to generate this file using some CLI command ? Or we have to create this file from scratch ? Thank you.

 

Best Regards,

 

Minh Pham 

Hi @MinhPham96 ,

Do you want to use CLI command to generate the web resource file?

 

If you want to use CLI command to generate the web resource file, I afriad that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could consider update your Code Custom Component. Please consider refer to the following article:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/updating-existing-controls

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,664)