Skip to content

Instantly share code, notes, and snippets.

View rappen's full-sized avatar

Jonas Rapp rappen

View GitHub Profile
rappen / MyIOrganizationService.cs
Created September 23, 2022 15:15
Sample of IOrganizationService implementation
#region IOrganizationService implementation
public Guid Create(Entity entity)
Trace($"Creating {entity.LogicalName} with {entity.Attributes.Count} attributes");
var result = Service.Create(entity);
return result;
using System;
namespace XrmToolBox.Constants
// Guids of tools, to be used when referencing tool A from tool B in integration scenarios.
// Feel free to submit your own tool ids here, to help grow integration possibilities!
// Original file found at:
public static class XrmToolBoxToolIds
rappen / CanaryTracer.cs
Last active April 11, 2024 10:28
CanaryTracer - writes IExecutionContext to Plugin Trace Log
/* ***********************************************************
* CanaryTracer.cs
* Found at:
* Created by: Jonas Rapp
* Get full solution:
* Writes everything from an IExecutionContext to the Plugin Trace Log.
* Simplest call:
* serviceProvider.TraceContext();
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using System.Xml;
namespace Rappen.Xrm.Extensions
public static class ServiceExtensions
/// <summary>
/* ***********************************************************
* XTBAppInsights.cs
* Found at:
* Created by: Jonas Rapp
* Immensely inspired by: code from Jason Lattimer
* Simplifies logging to Azure Application Insights from XrmToolBox tools.
* Sample from tool constructor:
* ai = new AppInsights("", "[a guid that is the key to your appinsights resource]", Assembly.GetExecutingAssembly(), "[my custom tool name]");