Skip to content

Instantly share code, notes, and snippets.

View nicknow's full-sized avatar

Nicolas Nowinski nicknow

View GitHub Profile
@nicknow
nicknow / Timing Using Action vs Direct - C#
Created July 18, 2018 18:28
Test to determine if there is a performance impact calling a method passed as an Action instead of directly. To be run in LinqPad (as a C# Program)
void Main()
{
RunDirectly();
RunIndirectly();
var sw = new Stopwatch();
sw.Start();
for (int i = 0; i < 100; i++)
{
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>
@nicknow
nicknow / CrmHelperExtensions.cs
Last active October 15, 2016 09:06
Dynamics CRM Helper Extension Methods
// See end of file for Copyright and MIT License.
using System;
using Microsoft.Xrm.Sdk;
namespace ThinkCrm.Helper
{
public static class CrmHelperExtensions
{
@nicknow
nicknow / FetchXML_Retrieve_AccessTeamMembers.xml
Created May 19, 2015 22:21
Dynamics CRM FetchXML Example To Retrieve Access Team Members
<fetch count="50" >
<entity name="opportunity" >
<attribute name="name" />
<link-entity name="principalobjectaccess" from="objectid" to="opportunityid" link-type="inner" alias="poa" >
<attribute name="objectid" alias="objectid" />
<link-entity name="team" from="teamid" to="principalid" link-type="inner" >
<link-entity name="teamtemplate" from="teamtemplateid" to="teamtemplateid" >
<attribute name="teamtemplatename" />
</link-entity>
<link-entity name="teammembership" from="teamid" to="teamid" link-type="inner" intersect="true" >