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 itExperts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE