Skip to content

Commit 499301d

Browse files
committed
Closed #19 Only show CAPIM button if tool is installed
1 parent b1ce9c1 commit 499301d

File tree

3 files changed

+112
-108
lines changed

3 files changed

+112
-108
lines changed

CustomActionTester/CAT.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
using Microsoft.Xrm.Sdk;
33
using System;
44
using System.Diagnostics;
5+
using System.Linq;
56
using System.Reflection;
67
using System.Windows.Forms;
78
using xrmtb.XrmToolBox.Controls.Controls;
9+
using XrmToolBox;
810
using XrmToolBox.Extensibility;
911

1012
namespace Rappen.XTB.CAT
@@ -39,7 +41,7 @@ private void FixFormForTool()
3941
tslAbout.Image = catTool.Logo24;
4042
gbCustomWhat.Text = catTool.Target;
4143
lblCustomWhat.Text = catTool.Target;
42-
btnManage.Visible = !string.IsNullOrWhiteSpace(catTool.ManagerTool);
44+
btnManage.Visible = !string.IsNullOrWhiteSpace(catTool.ManagerTool) && PluginManagerExtended.Instance.Plugins.Any(p => p.Metadata.Name == catTool.ManagerTool);
4345
RefreshLayout();
4446
}
4547

@@ -50,6 +52,7 @@ private void FixFormForTool()
5052
public override void UpdateConnection(IOrganizationService newService, ConnectionDetail detail, string actionName, object parameter)
5153
{
5254
base.UpdateConnection(newService, detail, actionName, parameter);
55+
btnOpenAction.Text = $"Open in {(detail.WebApplicationUrl.ToLower().Contains("dynamics.com") ? "Dataverse" : "CRM")}";
5356
LoadEntities();
5457
cmbSolution.OrganizationService = newService;
5558
cmbCustomActions.OrganizationService = newService;

CustomActionTester/CAT.designer.cs

Lines changed: 65 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)