cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rexkenley
Kudo Collector
Kudo Collector

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

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
Memorable Member
Memorable Member

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?

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.

 

 

Hi @rexkenley ,

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.

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.

 

 

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?

 

 

 

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,253)