Skip to content

Commit 049c1aa

Browse files
authored
Merge pull request #1419 from MscrmTools/RemoveGitter
Fixed issue where the wrong connection is taken when opening a new pl…
2 parents d5bb50b + c82f7e6 commit 049c1aa

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

XrmToolBox/New/NewForm.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,14 +758,14 @@ private UserControl DisplayPluginControl(Lazy<IXrmToolBoxPlugin, IPluginMetadata
758758
mruItem.ConnectionName = connectionDetail.ConnectionName;
759759
mruItem.ConnectionFileName = connectionDetail.ParentConnectionFile?.Name;
760760

761+
var crmSvcClient = connectionDetail.GetCrmServiceClient();
762+
761763
if (connectionDetail.IsFromSdkLoginCtrl)
762764
{
763-
((IXrmToolBoxPluginControl)pluginControl).UpdateConnection(service, connectionDetail);
765+
((IXrmToolBoxPluginControl)pluginControl).UpdateConnection(crmSvcClient, connectionDetail);
764766
}
765767
else
766768
{
767-
var crmSvcClient = connectionDetail.GetCrmServiceClient();
768-
769769
((IXrmToolBoxPluginControl)pluginControl).UpdateConnection(crmSvcClient, connectionDetail);
770770
}
771771

@@ -1071,7 +1071,7 @@ private async void PluginsForm_OpenPluginRequested(object sender, PluginEventArg
10711071
return;
10721072
}
10731073

1074-
if (service == null && e.MruInfo == null)
1074+
if (connectionDetail == null && e.MruInfo == null)
10751075
{
10761076
var result = MessageBox.Show(new Form { TopMost = true }, @"Do you want to connect to an organization first?", $@"Opening {e.Plugin.Metadata.Name}",
10771077
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
@@ -1699,6 +1699,7 @@ private void ApplyActiveContentDisplay()
16991699
{
17001700
ccsb.SetConnectionStatus(pcb.ConnectionDetail != null, pcb.ConnectionDetail);
17011701
connectionDetail = pcb.ConnectionDetail;
1702+
service = pcb.ConnectionDetail.GetCrmServiceClient();
17021703
pluginsForm.ConnectionDetail = pcb.ConnectionDetail;
17031704
}
17041705
}

XrmToolBox/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
3737
// en utilisant '*', comme indiqué ci-dessous :
3838
// [assembly: AssemblyVersion("1.0.*")]
39-
[assembly: AssemblyVersion("1.2025.7.71")]
40-
[assembly: AssemblyFileVersion("1.2025.7.71")]
39+
[assembly: AssemblyVersion("1.2025.10.72")]
40+
[assembly: AssemblyFileVersion("1.2025.10.72")]

0 commit comments

Comments
 (0)