Skip to content

Instantly share code, notes, and snippets.

View AshV's full-sized avatar
🚩
Help me https://www.ashishvishwakarma.com/helpme/

Ashish Vishwakarma AshV

🚩
Help me https://www.ashishvishwakarma.com/helpme/
View GitHub Profile
@AshV
AshV / JsonNullHandling.cs
Last active February 5, 2019 10:52
Remove null properties while serializing JSON using Newtonsoft.Json
using Newtonsoft.Json;
JsonConvert.SerializeObject(
<your Object to be serialized>,
Newtonsoft.Json.Formatting.None,
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
}));
<!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 = {
<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>
public class WF : CodeActivity
{
[RequiredArgument]
[Input("Code")]
public InArgument<string> Code { get; set; }
[Output("Custom Team")]
[ReferenceTarget("team")]
public OutArgument<EntityReference> CustomTeam { get; set; }
using Microsoft.Xrm.Sdk;
using System;
namespace Plugin
{
public class TestPlugin : IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
var tracing = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;
using System;
using System.Activities;
namespace WordCountWorkflow
{
public class WordCount : CodeActivity
{
[Output("phone")]
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.2.2/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.min.js"></script>
</head>
<body>
<button onclick="getAttachmentList()">Download All Attachmenta</button>
@AshV
AshV / FetchXML.md
Created March 27, 2023 14:55 — forked from jdthorpe/FetchXML.md
Notes on FetchXML

Learn to Love Tolerate FetchXML

Overview

FetchXML seems to be a quirky subset of the SQL implemented in XML and optimized for UI tasks, including:

  • the ability select specific fields (foo, b.bar) or all fields (*) from an entity
  • perform LEFT OUTER and INNER joins
  • assign aliases to attributes (select a.b as foo) and (joined) entities (left join foo as BAR)
@AshV
AshV / fetchXml-CurrentUserAssignedRoles.xml
Last active April 12, 2023 22:16
FetchXml query to list all Security Roles assigned to Current/LoggedIn user.
<fetch>
<entity name="systemuser">
<filter>
<condition attribute="systemuserid" operator="eq-userid"/>
</filter>
<link-entity name="systemuserroles" from="systemuserid" to="systemuserid">
<link-entity name="role" from="roleid" to="roleid" alias="AssignedRole">
<attribute name="name"/>
</link-entity>
</link-entity>
@AshV
AshV / fetchXml-ListAllCloudFlowsWithSolution.xml
Created April 12, 2023 21:43
FetchXml query to list out all cloud flows in an environment along with solutions where they are added
<fetch>
<entity name="solutioncomponent">
<link-entity name="solution" to="solutionid" from="solutionid" alias="solution" link-type="inner">
<attribute name="solutionid"/>
<attribute name="friendlyname"/>
</link-entity>
<link-entity name="workflow" to="objectid" from="workflowid" alias="flow" link-type="inner">
<attribute name="workflowid"/>
<attribute name="name"/>
<filter>