cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rextan
Level: Powered On

Need help with deployment solution procedure

I followed the steps outlined here. However, my component is not showing up in the custom control list. 

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls

 

This is my project. It runs fine in the control harness.

https://github.com/rexkenley/d365MultipleLinesHTML

 

Thanks.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rextan
Level: Powered On

Re: Need help with deployment solution procedure

After a few more tests and naming variations, I can't reproduce the issue anymore. The best I could tell was that there was a residual unmanaged version of the control that I accidentally deployed (and could have sworn deleted) that is contributing to the issue.

 

So the take away is to make sure you clear out all unwanted code artifacts.

 

But as a side benefit I did find out I can customize the deploy package name  to be the same as the main project name (even though the pac command forbids it). Just go to deploy\Other\Solution.xml and modify the <UniqueName> node and

<LocalizedName description> property. Your solution file will still be named deploy but the display in crm will be the project name.
 

View solution in original post

6 REPLIES 6
seadude
Level 10

Re: Need help with deployment solution procedure

Have you imported the Solution.zip file to your environment? If you have multiple CDS environments, are you certain you are in the correct environment?

rextan
Level: Powered On

Re: Need help with deployment solution procedure

We have only 1 environment.

 

I decided to start from scratch but was unsuccessful. Here are the steps I took

  1. md d365MultipleLinesHTML & cd d365MultipleLinesHTML
  2. pac pcf init --namespace d365 --name MultipleLinesHTML --template field
  3. npm i
  4. npm run build 
  5. md d365MLHTMLSolution & cd d365MLHTMLSolution
  6. pac solution init --publisher-name KentorThames --publisher-prefix kt
  7. pac solution add-reference --path <parent folder>
  8. msbuild /t:build /restore /p:configuration=Release
  9. Import solution to system
 

I have attached the screen shots.

 

 

Community Support Team
Community Support Team

Re: Need help with deployment solution procedure

Hi @rextan ,

Have you taken a try to deploy your code Component to your CDS directly using pac command?

Do you mean that you could add not custom control to a Entity?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. On your side, you could also consider take a try to deploy your code Component to your CDS directly using pac command as below:

pac auth create --url <https://xyz.crm.dynamics.com> 

Note: The <https://xyz.crm.dynamics.com> represents the D365 instance URL related to your PowerApps Environment.

After that, push your code component to your CDS using the following pcf command:

pac pcf push --publisher-prefix <your publisher prefix>

 

Based on the screenshot that you mentioned, I found that you have imported your code component as custom control in your PowerApps Environment successfully. If you do not see the code component under the "Add Control" panel, please check if the Code Component has been displayed in a different name.

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

The user @MinhPham96 has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Power-Apps-Component-Framework/Cannot-add-Custom-Component-to-En...

Please consider add your custom control within a specific Entity form mentioned as above, then check if the issue is solved.

 

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.
rextan
Level: Powered On

Re: Need help with deployment solution procedure

The name is correct

<control namespace="d365" constructor="MultipleLinesHTML" version="0.0.1" display-name-key="MultipleLinesHTML" description-key="MultipleLinesHTML description" control-type="standard">

 

I read the @MinhPham96 thread and this could be the cause of the problem.

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

 

My managed solution only has the control, it doesn't have the Entity. I have attached my code in a zip file, can you please see if it works for you?

 

You need to run

  1. npm i
  2. npm run build
  3. msbuild /t:build /restore /p:configuration=Release

You will then get the managed solution file. Thanks for taking a look at this.

 

 

rextan
Level: Powered On

Re: Need help with deployment solution procedure

Now this is VERY strange. I repeated the same process except this time I use Test for the name and "deploy" for the deployment solution name and it works.

 

  1. md Test & cd Test
  2. pac pcf init --namespace d365 --name Test --template field
  3. npm i
  4. npm run build
  5. md deploy & cd deploy
  6. pac solution init --publisher-name KentorThames --publisher-prefix kt
  7. pac solution add-reference --path c:\temp\Test
  8. msbuild /t:build /restore /p:configuration=Release

I have attached a screenshot.

 

<control namespace="d365" constructor="Test" version="0.0.1" display-name-key="Test" description-key="Test description" control-type="standard" api-version="1.2.1">

 

Is there a limit to the length of the name?

 

 

 

rextan
Level: Powered On

Re: Need help with deployment solution procedure

After a few more tests and naming variations, I can't reproduce the issue anymore. The best I could tell was that there was a residual unmanaged version of the control that I accidentally deployed (and could have sworn deleted) that is contributing to the issue.

 

So the take away is to make sure you clear out all unwanted code artifacts.

 

But as a side benefit I did find out I can customize the deploy package name  to be the same as the main project name (even though the pac command forbids it). Just go to deploy\Other\Solution.xml and modify the <UniqueName> node and

<LocalizedName description> property. Your solution file will still be named deploy but the display in crm will be the project name.
 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,591)