Skip to content

Instantly share code, notes, and snippets.

View mktange's full-sized avatar
💡

Martin Kasban Tange mktange

💡
View GitHub Profile
@mktange
mktange / Plugin.cs
Last active June 7, 2018 11:08
Extended Plugin.cs which makes DAXIF# v2.1+ able to synchronize plugins to a CRM solution, without the use of the PluginRegistration tool.
namespace DG.Some.Namespace
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.ServiceModel;
using System.Linq.Expressions;
using Microsoft.Xrm.Sdk;
@mktange
mktange / ExtractControlLabels.js
Last active August 29, 2015 14:24
Use in developer console while on the desired CRM form page. Extracts all visible control labels from a Dynamics CRM form, and saves it as a .csv file. Useful for creating a template for data import based on a CRM form.
javascript:
function getFrame() {
var e = $('#crmContentPanel iframe:not([style*="visibility: hidden"])');
return e.length > 0 && e[0].contentWindow.Xrm.Page.ui ? e[0].contentWindow : null
}
function download(e, t) {
var n = document.createElement("a");
if (n.setAttribute("href", "data:text/plain;charset=utf-8," + encodeURIComponent(t)), n.setAttribute("download", e), document.createEvent) {
var a = document.createEvent("MouseEvents");
a.initEvent("click", !0, !0), n.dispatchEvent(a)