Skip to content

Commit

Permalink
Resolved bug #36. Thanks @wnbittle
Browse files Browse the repository at this point in the history
  • Loading branch information
Power-Maverick committed Feb 3, 2021
1 parent f3e62bc commit 814c724
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Maverick.PCF.Builder.Helper
{
public class CDSHelper
public class DataverseHelper
{
/// <summary>
/// Retrieve list of unmanaged and visible solutions
Expand All @@ -32,7 +32,7 @@ public static EntityCollection RetrieveSolutions(IOrganizationService orgService
querySolution.Criteria.AddCondition("ismanaged", ConditionOperator.Equal, false);
querySolution.Criteria.AddCondition("isvisible", ConditionOperator.Equal, true);
LinkEntity linkPublisher = querySolution.AddLink("publisher", "publisherid", "publisherid");
linkPublisher.Columns = new ColumnSet("customizationprefix");
linkPublisher.Columns = new ColumnSet("customizationprefix", "uniquename", "friendlyname");
linkPublisher.EntityAlias = "pub";

return orgService.RetrieveMultiple(querySolution);
Expand Down
18 changes: 12 additions & 6 deletions Maverick.PCF.Builder/MainPluginControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ private void Routine_ExistingSolution()
{
if (chkUseExistingSolution.Checked)
{
txtSolutionName.Visible = false;
txtSolutionFriendlyName.Visible = false;
//txtSolutionName.Visible = false;
txtPublisherFriendlyName.Enabled = false;
txtPublisherUniqueName.Enabled = false;
txtPublisherPrefix.Enabled = false;
cboxSolutions.Visible = true;
Expand All @@ -387,7 +389,9 @@ private void Routine_ExistingSolution()
}
else
{
txtSolutionName.Visible = true;
txtSolutionFriendlyName.Visible = true;
//txtSolutionName.Visible = true;
txtPublisherFriendlyName.Enabled = true;
txtPublisherUniqueName.Enabled = true;
txtPublisherPrefix.Enabled = true;
cboxSolutions.Visible = false;
Expand Down Expand Up @@ -1422,7 +1426,7 @@ private void LoadSolutions()
{
var start = DateTime.Now;

args.Result = CDSHelper.RetrieveSolutions(Service);
args.Result = DataverseHelper.RetrieveSolutions(Service);

var end = DateTime.Now;
var duration = end - start;
Expand Down Expand Up @@ -1472,7 +1476,7 @@ private void ExportAndUnpackSolutions(string solutionName, string exportToPath)
{
var start = DateTime.Now;

args.Result = CDSHelper.ExportSolution(Service, solutionName);
args.Result = DataverseHelper.ExportSolution(Service, solutionName);

var end = DateTime.Now;
var duration = end - start;
Expand Down Expand Up @@ -2313,10 +2317,12 @@ private void cboxSolutions_SelectedIndexChanged(object sender, EventArgs e)
{
SealedClasses.SolutionDetails selectedSolution = (SealedClasses.SolutionDetails)cboxSolutions.SelectedItem;

txtSolutionName.Text = selectedSolution.MetaData.GetAttributeValue<string>("uniquename");
txtSolutionFriendlyName.Text = selectedSolution.MetaData.GetAttributeValue<string>("friendlyname");
txtPublisherUniqueName.Text = (selectedSolution.MetaData.GetAttributeValue<AliasedValue>("pub.uniquename")).Value.ToString();
txtPublisherFriendlyName.Text = (selectedSolution.MetaData.GetAttributeValue<AliasedValue>("pub.friendlyname")).Value.ToString();
txtPublisherPrefix.Text = (selectedSolution.MetaData.GetAttributeValue<AliasedValue>("pub.customizationprefix")).Value.ToString();
txtPublisherUniqueName.Text = selectedSolution.MetaData.GetAttributeValue<EntityReference>("publisherid").Name;
txtSolutionVersion.Text = selectedSolution.MetaData.GetAttributeValue<string>("version");
txtSolutionName.Text = selectedSolution.MetaData.GetAttributeValue<string>("uniquename");
}

private void MainPluginControl_OnCloseTool(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion Maverick.PCF.Builder/MainPluginControl.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Maverick.PCF.Builder/Maverick.PCF.Builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<Compile Include="Helper\Commands.cs" />
<Compile Include="Helper\Enum.cs" />
<Compile Include="Helper\JsonHelper.cs" />
<Compile Include="Helper\CDSHelper.cs" />
<Compile Include="Helper\DataverseHelper.cs" />
<Compile Include="Helper\Telemetry.cs" />
<Compile Include="Helper\XmlHelper.cs" />
<Compile Include="MainPlugin.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Maverick.PCF.Builder/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
1. Publisher prefix only accepts lowercase to align it with Dataverse (#35)

---- BUG FIXES ----
No bug fixes in this release
1. Bug fixed with use of "Existing Solution"
2 changes: 1 addition & 1 deletion PCF-CustomControlBuilder.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
1. Publisher prefix only accepts lowercase to align it with Dataverse (#35)

---- BUG FIXES ----
No bug fixes in this release
1. Bug fixed with use of "Existing Solution"
</releaseNotes>
<copyright>Copyright © Danish Naglekar</copyright>
<tags>XrmToolBox, PCF, Power Apps, Power Apps Component Framework, PCF Builder</tags>
Expand Down

0 comments on commit 814c724

Please sign in to comment.