using FakeXrmEasy;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk.Query;
using PACCAR_CRM_Code.Library;
using PACCAR_CRM_Code.Library.Result;
using PACCAR_CRM_Code.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Xml;
using Xunit;
namespace UnitTestProject
{
public class Test
{
private static string OrgService = "http://spaceshuttle-test/LaunchTest";
[Fact]
public void Test_Debug()
{
var utilities = new Utilities();
var ctx = new XrmFakedContext();
var TracingService = new XrmFakedTracingService();
var PIEventlog = new EventLog();
//Establish Connection to CRM
Uri organizatinUri = new Uri(OrgService + "/XRMServices/2011/Organization.svc");
ClientCredentials credentials = new ClientCredentials();
credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials; //new NetworkCredential("zzitdrentestcrm", "d#!b28$Oe@E1b!");
credentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
OrganizationServiceProxy service = new OrganizationServiceProxy(organizatinUri, null, credentials, null);
service.EnableProxyTypes();
//Retrieve a quote for example
Entity quote = service.Retrieve("quote", new Guid("YOUR GUID GOES HERE"), new ColumnSet(true));
// Implement your Code here and use the quote above as the data if you require it
}
}
}
This is not working for me. I get errors in the Error List and cannot get a clean build locally. Basically I am not sure what code to put in where the example above says: // Implement your Code here and use the quote above as the data if you require itNetwork and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.