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
public class WF : CodeActivity | |
{ | |
[RequiredArgument] | |
[Input("Code")] | |
public InArgument<string> Code { get; set; } | |
[Output("Custom Team")] | |
[ReferenceTarget("team")] | |
public OutArgument<EntityReference> CustomTeam { get; set; } |
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>Speech SDK JavaScript Quickstart</title> | |
</head> | |
<body> | |
<!-- UI code goes here --> | |
<div id="warning"> | |
<h1 style="font-weight:500;">Speech Recognition Speech SDK not found (microsoft.cognitiveservices.speech.sdk.bundle.js missing).</h1> | |
</div> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script src="https://www.gstatic.com/firebasejs/6.1.1/firebase-app.js"></script> | |
<script src="https://www.gstatic.com/firebasejs/6.1.1/firebase-database.js"></script> | |
<script> | |
var firebaseConfig = { |
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 Newtonsoft.Json; | |
JsonConvert.SerializeObject( | |
<your Object to be serialized>, | |
Newtonsoft.Json.Formatting.None, | |
new JsonSerializerSettings | |
{ | |
NullValueHandling = NullValueHandling.Ignore | |
})); |
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
{ | |
"[email protected]": "/contacts(<regarding contact record guid>)", | |
"subject": "Email Subject", | |
"description": "Email Description", | |
"email_activity_parties": [ | |
{ | |
"[email protected]": "/systemusers(<from system user record guid>)", | |
"participationtypemask": 1 | |
}, | |
{ |
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
/// Required-Namespaces | |
using Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using System.Threading.Tasks; | |
/// Method-to-generate-Access-Token | |
public static async Task<string> AccessTokenGenerator() | |
{ | |
string clientId = "Azure AD App Id"; | |
string clientSecret = "Client Secret Generated for App"; | |
string authority = "https://login.microsoftonline.com/< your app tenant guid >"; |
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
Xrm.WebApi.retrieveRecord( | |
"msdyncrm_customerjourney", | |
"945a02a0-b2db-e811-a967-000d3af29269", | |
"$select=msdyncrm_workflowdefinition").then( | |
function (result) { | |
debugger; | |
console.log(result); | |
var workflowdefinition = JSON.parse(result.msdyncrm_workflowdefinition); | |
// Retrieve nodes related to provided component. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Execute fetchXML with WebAPI in Dynamics 365 using JavaScript</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css" integrity="sha256-Ro/wP8uUi8LR71kwIdilf78atpu8bTEwrK5ZotZo+Zc=" crossorigin="anonymous" /> | |
<style> button { width:100% } </style> | |
</head> | |
<body> | |
<h1>Testing : Execute fetchXML with WebAPI in Dynamics 365 using JavaScript</h1> | |
<button onclick="GetXHR()" id="GetXHR">Test using GET with XMLHttpRequest</button> |
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://stackoverflow.com/questions/1879395/how-do-i-generate-a-stream-from-a-string | |
public static Stream GenerateStreamFromString(string s) | |
{ | |
MemoryStream stream = new MemoryStream(); | |
StreamWriter writer = new StreamWriter(stream); | |
writer.Write(s); | |
writer.Flush(); | |
stream.Position = 0; | |
return stream; | |
} |
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"); |