Skip to content

Commit

Permalink
Revert "Revert "Merge remote-tracking branch 'upstream/master'""
Browse files Browse the repository at this point in the history
This reverts commit d8aee71.
  • Loading branch information
LinnZawWin committed Aug 22, 2020
1 parent d8aee71 commit 645cabb
Show file tree
Hide file tree
Showing 90 changed files with 3,593 additions and 5,789 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: ['rappen']
27 changes: 15 additions & 12 deletions FetchXMLBuilder.nuspec
Expand Up @@ -6,20 +6,22 @@
<title>FetchXML Builder for XrmToolBox</title>
<authors>Jonas Rapp</authors>
<owners>rappen</owners>
<projectUrl>http://fxb.xrmtoolbox.com</projectUrl>
<iconUrl>http://fxb.xrmtoolbox.com/images/FXB-150-tsp.png</iconUrl>
<projectUrl>http://fetchxmlbuilder.com</projectUrl>
<iconUrl>https://fetchxmlbuilder.com/fxb150/</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Build queries for D365, CRM, XRM, CDS and the Power Platform. Investigate data. Get code. Empower yourself to achieve more.</summary>
<summary>Build queries for Microsoft Dataflex, Dynamics 365 and the Power Platform. Investigate data. Get code. Empower yourself to achieve more.</summary>
<description>
FetchXML Builder is used to create and execute queries against CDS and Dynamics 365/CRM data.
CDS includes technologies we know as:
Build queries for Microsoft Dataflex, Dynamics 365 and the Power Platform. Investigate data. Get code. Empower yourself to achieve more.

FetchXML Builder is used to create and execute queries against Microsoft Dataflex and Dynamics 365/CRM data.
Dataflex and Dataflex Pro include technologies we know as:
- Microsoft Dynamics 365
- Dynamics CRM
- Common Data Service (CDS)
- XRM
- Power Apps (Model Driven)
- Power Apps (Canvas connected to D365 or CDS)
- PowerBI (connected to D365 or CDS)
- Power Apps (Canvas connected to D365 or Dataflex)
- PowerBI (connected to D365 or Dataflex)
- Microsoft Teams apps

The tool will assist in three major areas:

Expand All @@ -30,7 +32,7 @@ The tool will assist in three major areas:
- attributes from multi-level linked entities
- update existing views with altered queries

2. Querying CDS/CRM for information not (easily) found in the UI
2. Querying Dataflex/CRM for information not (easily) found in the UI
- system / internal entities
- attributes hidden in CRM UI
- join on other fields than relationships
Expand All @@ -42,17 +44,18 @@ The tool will assist in three major areas:
- SQL, JavaScript and C# stubs
- Easy to use UI to compose queries for reports in CRM

The tool reads metadata from CDS to assist with selecting entities, attributes, relations and to perform validation of condition values.
The tool reads metadata from Microsoft Dataflex and Dynamics 365 / CRM to assist with selecting entities, attributes, relations and to perform validation of condition values.

To make it even more appealing, there is also the possibility to have it show "Friendly names", which will replace the technical names of entities and attributes with their display names in the users' currently selected language, much like Advanced Find does.
</description>
<releaseNotes>
Full release notes: https://github.com/rappen/FetchXMLBuilder/releases/tag/$buildnumber$
Full release notes:
👉 https://github.com/rappen/FetchXMLBuilder/releases/tag/$buildnumber$
</releaseNotes>
<copyright>Copyright Jonas Rapp 2014-2020</copyright>
<tags>XrmToolBox Plugins FetchXML Builder</tags>
<dependencies>
<dependency id="XrmToolBox" version="1.2020.4.38" />
<dependency id="XrmToolBox" version="1.2020.6.40" />
</dependencies>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion FetchXmlBuilder.sln
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28407.52
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FetchXMLBuilder", "FetchXMLBuilder\FetchXMLBuilder.csproj", "{D746CBE7-7787-47FC-B773-F089A44DF8C9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FetchXMLBuilder", "FetchXmlBuilder\FetchXMLBuilder.csproj", "{D746CBE7-7787-47FC-B773-F089A44DF8C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditorUtils", "XmlEditorUtils\XmlEditorUtils.csproj", "{9FC7BDF7-321C-4B96-9B70-D75A16BD7685}"
EndProject
Expand Down
40 changes: 40 additions & 0 deletions FetchXmlBuilder/AppCode/EntityNode.cs
@@ -0,0 +1,40 @@
using Cinteros.Xrm.FetchXmlBuilder.AppCode;
using System.Windows.Forms;

namespace Cinteros.Xrm.FetchXmlBuilder.AppCode
{
public class EntityNode
{
#region Public Fields

public string EntityName;

#endregion Public Fields

#region Private Fields

private string name;

#endregion Private Fields

#region Public Constructors

public EntityNode(TreeNode node)
{
EntityName = TreeNodeHelper.GetAttributeFromNode(node, "name");
var alias = TreeNodeHelper.GetAttributeFromNode(node, "alias");
name = !string.IsNullOrEmpty(alias) ? alias : EntityName;
}

#endregion Public Constructors

#region Public Methods

public override string ToString()
{
return name;
}

#endregion Public Methods
}
}
55 changes: 53 additions & 2 deletions FetchXmlBuilder/AppCode/FXBSettings.cs
@@ -1,8 +1,12 @@
using Cinteros.Xrm.FetchXmlBuilder.DockControls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Xml.Serialization;
using WeifenLuo.WinFormsUI.Docking;
using xrmtb.XrmToolBox.Controls;

namespace Cinteros.Xrm.FetchXmlBuilder.AppCode
{
Expand All @@ -25,6 +29,7 @@ public class FXBSettings
public bool OpenUncustomizableViews { get; set; } = false;
public bool UseSQL4CDS { get; set; }
public bool UseLookup { get; set; } = true;
public XmlColors XmlColors { get; set; } = new XmlColors();
}

public class QueryOptions
Expand Down Expand Up @@ -58,10 +63,10 @@ public class ResultOptions
public bool SysColumns { get; set; } = true;
public bool LocalTime { get; set; }
public bool CopyHeaders { get; set; } = true;
public int ResultOption { get; set; }
public int SerializeStyle { get; set; }
public ResultOutput ResultOutput { get; set; }
public bool RetrieveAllPages { get; set; } = false;
public bool AlwaysNewWindow { get; set; } = false;
public bool QuickFilter { get; set; } = false;
}

public class DockStates
Expand Down Expand Up @@ -161,4 +166,50 @@ public override string ToString()
return Name;
}
}

public class XmlColors
{
[Browsable(false)]
public string ElementColor { get { return Element.Name; } set { Element = Color.FromName(value); } }
[Browsable(false)]
public string ValueColor { get { return Value.Name; } set { Value = Color.FromName(value); } }
[Browsable(false)]
public string AttributeKeyColor { get { return AttributeKey.Name; } set { AttributeKey = Color.FromName(value); } }
[Browsable(false)]
public string AttributeValueColor { get { return AttributeValue.Name; } set { AttributeValue = Color.FromName(value); } }
[Browsable(false)]
public string CommentColor { get { return Comment.Name; } set { Comment = Color.FromName(value); } }
[Browsable(false)]
public string TagColor { get { return Tag.Name; } set { Tag = Color.FromName(value); } }
[XmlIgnore()]
public Color Element { get; set; } = Color.DarkRed;
[XmlIgnore()]
public Color Value { get; set; } = Color.Black;
[XmlIgnore()]
public Color AttributeKey { get; set; } = Color.Red;
[XmlIgnore()]
public Color AttributeValue { get; set; } = Color.Blue;
[XmlIgnore()]
public Color Comment { get; set; } = Color.Gray;
[XmlIgnore()]
public Color Tag { get; set; } = Color.Blue;

public void ApplyToControl(XMLViewer viewer)
{
viewer.Settings.AttributeKey = AttributeKey;
viewer.Settings.AttributeValue = AttributeValue;
viewer.Settings.Comment = Comment;
viewer.Settings.Element = Element;
viewer.Settings.Tag = Tag;
viewer.Settings.Value = Value;
}
}

public enum ResultOutput
{
Grid = 0,
XML = 1,
JSON = 2,
Raw = 3
}
}
4 changes: 4 additions & 0 deletions FetchXmlBuilder/AppCode/OData4CodeGenerator.cs
Expand Up @@ -674,6 +674,10 @@ private static string GetCondition(string entityName, condition condition, Fetch

result += FormatValue(valueType, condition.value);
}
else if (!string.IsNullOrEmpty(condition.valueof))
{
result += condition.valueof;
}
}
return result;
}
Expand Down

0 comments on commit 645cabb

Please sign in to comment.