Skip to content

Commit

Permalink
Removed direct dependency to FXB
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Rapp committed Jun 23, 2016
1 parent 0e273ae commit 301473e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
9 changes: 5 additions & 4 deletions Cinteros.XTB.BulkDataUpdater.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<id>Cinteros.XrmToolBox.BulkDataUpdater</id>
<version>1.0.0</version>
<title>Bulk Data Updater</title>
<authors>Innofactor AB</authors>
<authors>Jonas Rapp, Innofactor AB</authors>
<owners>Innofactor</owners>
<projectUrl>http://cinteros.xrmtoolbox.com</projectUrl>
<iconUrl>http://rappen.net/Cinteros/BDU-if.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Updates or touches single attributes on a set of records.</description>
<summary>XrmToolBox plugin to update or touch single attributes on a set of records.</summary>
<releaseNotes>This tool is useful to trigger workflows or plugins, as well as bulk updating any number of records with fixed values.

Note: This plugin requires the FetchXML Builder to be installed to work properly!</releaseNotes>
<releaseNotes>
This tool is useful to trigger workflows or plugins, as well as bulk updating any number of records with fixed values.
</releaseNotes>
<copyright>Copyright 2016 Innofactor AB</copyright>
<tags>XrmToolBox Plugins Innofactor BulkDataUpdater</tags>
<dependencies>
Expand All @@ -22,5 +22,6 @@ Note: This plugin requires the FetchXML Builder to be installed to work properly
</metadata>
<files>
<file src="Cinteros.XTB.BulkDataUpdater\bin\Release\Cinteros.XTB.BulkDataUpdater.dll" target="lib\net452\Plugins" />
<file src="Cinteros.XTB.BulkDataUpdater\bin\Release\Cinteros.Xrm.XmlEditorUtils.dll" target="lib\net452\Plugins" />
</files>
</package>
2 changes: 2 additions & 0 deletions Cinteros.XTB.BulkDataUpdater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ after_build:
7z a Cinteros.XTB.BulkDataUpdater_%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\Cinteros.XTB.BulkDataUpdater\bin\%CONFIGURATION%\Cinteros.XTB.BulkDataUpdater.dll
7z a Cinteros.XTB.BulkDataUpdater_%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\Cinteros.XTB.BulkDataUpdater\bin\%CONFIGURATION%\Cinteros.Xrm.XmlEditorUtils.dll
appveyor PushArtifact Cinteros.XTB.BulkDataUpdater_%APPVEYOR_BUILD_VERSION%.zip
artifacts:
- path: '**\Cinteros.XrmToolBox.BulkDataUpdater.*.nupkg'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
<HintPath>..\packages\Cinteros.Xrm.CRMWinForm.2016.4.12.6\lib\Cinteros.Xrm.CRMWinForm.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Cinteros.Xrm.FetchXmlBuilder">
<HintPath>..\Dependencies\Cinteros.Xrm.FetchXmlBuilder.dll</HintPath>
</Reference>
<Reference Include="Cinteros.Xrm.XmlEditorUtils, Version=1.2016.4.106, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dependencies\Cinteros.Xrm.XmlEditorUtils.dll</HintPath>
Expand Down
17 changes: 5 additions & 12 deletions Cinteros.XTB.BulkDataUpdater/MainControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using Xrm.FetchXmlBuilder;
using Xrm.XmlEditorUtils;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Messages;
Expand Down Expand Up @@ -80,11 +79,9 @@ public string EmailAccount
public void OnIncomingMessage(XrmToolBox.Extensibility.MessageBusEventArgs message)
{
if (message.SourcePlugin == "FetchXML Builder" &&
message.TargetArgument != null &&
message.TargetArgument is FXBMessageBusArgument)
message.TargetArgument is string)
{
var fxbArg = (FXBMessageBusArgument)message.TargetArgument;
FetchUpdated(fxbArg.FetchXML);
FetchUpdated(message.TargetArgument);
}
}

Expand Down Expand Up @@ -421,8 +418,8 @@ private void GetRecords()
}
catch (PluginNotFoundException)
{
if (MessageBox.Show("FetchXML Builder was not found.\nDownload latest version from\n\nhttp://fxb.xrmtoolbox.com", "FetchXML Builder",
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
if (MessageBox.Show("FetchXML Builder was not found.\nInstall it from the XrmToolBox Plugin Store or visit\n\nhttp://fxb.xrmtoolbox.com", "FetchXML Builder",
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
{
DownloadFXB();
}
Expand Down Expand Up @@ -456,11 +453,7 @@ private void GetFromFXB()
{
//SourcePlugin = "Bulk Data Updater"
};
var fXBMessageBusArgument = new FXBMessageBusArgument(FXBMessageBusRequest.FetchXML)
{
FetchXML = fetchXml
};
messageBusEventArgs.TargetArgument = fXBMessageBusArgument;
messageBusEventArgs.TargetArgument = fetchXml;
OnOutgoingMessage(this, messageBusEventArgs);
}

Expand Down
Binary file removed Dependencies/Cinteros.Xrm.FetchXmlBuilder.dll
Binary file not shown.

0 comments on commit 301473e

Please sign in to comment.