This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint unused: false */ | |
/* globals Xrm */ | |
var XrmUtil = (function () { | |
// Private / Global var | |
var odataEndPoint = Xrm.Page.context.getClientUrl() + '/api/data/v8.2/'; | |
// Private / Global function | |
var ErrorHandler = function (e, origin) { | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Dynamics CRM Link To Record | |
// @namespace seequent.com | |
// @version 0.2 | |
// @description Add a copy link to clipboard option to the three dot menu below the ribbon. | |
// @author [email protected] | |
// @match https://*.dynamics.com/* | |
// @grant GM_log | |
// @run-at document-idle | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!window.parent.document.querySelector('style#v9removepadding')) { | |
var style = window.parent.document.createElement('style'); | |
style.id = "v9removepadding"; | |
style.innerText = ".acwallEmailView .emailexpandedaccordion { margin:0; width:100% } TABLE.ms-crm-FormSection td { padding: 4px 1px 1px 16px !important; min-height: 26px; }"; | |
window.parent.document.body.appendChild(style); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Xrm.Plugins.Sandbox | |
{ | |
using Microsoft.Xrm.Sdk; | |
using System; | |
using System.Collections.ObjectModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.ServiceModel; | |
using System.ComponentModel.Design; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.ashishvishwakarma.com/set-lookup-view-with-javascript-dynamics-crm-365/ | |
function formOnLoad() { | |
setLookupViewByName("parentaccountid", "Customers", true); | |
} | |
function setLookupViewByName(fieldName, viewName, asynchronous) { | |
var req = new XMLHttpRequest(); | |
req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v8.2/savedqueries?$select=savedqueryid&$filter=name eq '" + viewName + "'", asynchronous); | |
req.setRequestHeader("OData-MaxVersion", "4.0"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
string prefix = "new"; | |
var sourceConnectionString = $@"Url=https://SOURCE.crm.dynamics.com;AuthType=Office365;UserName=USERNAME;Password=PASSWORD;RequireNewInstance=true;"; | |
var targetConnectionString = $@"Url=https://TARGET.crm.dynamics.com;AuthType=Office365;UserName=USERNAME;Password=PASSWORD;RequireNewInstance=true;"; | |
var sourceCrmSvcClient = new CrmServiceClient(sourceConnectionString); | |
var targetCrmSvcClient = new CrmServiceClient(targetConnectionString); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Xrm.Sdk; | |
using Microsoft.Xrm.Sdk.Query; | |
using System.Collections.Generic; | |
namespace Contoso.CrmPlugins | |
{ | |
public static class Common | |
{ | |
/// <summary> | |
/// Retrieves the entity by unique values. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
<!--要注意這邊於Dynamics CRM 引用的問題--> | |
<script src="//cdn.ckeditor.com/4.4.7/standard/ckeditor.js"></script> | |
<script src="https://sigmueclab.crm5.dynamics.com/_static/_common/scripts/jquery-2.1.1.min.js"></script> | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace nicknow.Logging | |
{ | |
static class NonSandboxedExceptionLogging | |
{ | |
///From the example at http://stackoverflow.com/a/12827271/394978 | |
/// <summary> | |
/// This utility method can be used for retrieving extra details from exception objects. Cannot be used in code running in the Dynamics CRM Sandbox | |
/// </summary> | |
/// <param name="e">Exception.</param> | |
/// <param name="indent">Optional parameter. String used for text indent.</param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fct_GetPlainTextFromHtml(htmlString) { | |
string htmlTagPattern = "<.*?>"; | |
var regexCss = new Regex("(\\<script(.+?)\\</script\\>)|(\\<style(.+?)\\</style\\>)", RegexOptions.Singleline | RegexOptions.IgnoreCase); | |
htmlString = regexCss.Replace(htmlString, string.Empty); | |
htmlString = Regex.Replace(htmlString, htmlTagPattern, string.Empty); | |
htmlString = Regex.Replace(htmlString, @"^\s+$[\r\n]*", "", RegexOptions.Multiline); | |
htmlString = htmlString.Replace(" ", string.Empty); | |
return htmlString ; | |
} |
NewerOlder