This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
Is it possible to include support for CrmServiceClient ? #581
Unanswered
pavansarma93
asked this question in
Q&A
Replies: 1 comment 14 replies
-
HI @pavansarma93 , It is already there. Since FakeXrmEasy provides mocks for the IOrganizationService interface, and CrmServiceClient implements such interface, you could also mock these requests too. The plugin and workflow helpers are, in fact, helpers on top of that functionality. The most valuable aspect of FakeXrmEasy is it's low-level mocking and in-memory query engine. Hope this helps! |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently I am having an azure function V1.1 which uses Crmserviceclient to perform Dynamics operations. However all the stub methods available in FakeXrmEasy are plugin or workflow related.
Is it possible to provide support for CrmServiceClient ?
Here is a sample code to test I am using
`using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Tooling.Connector;
namespace FnApp_Framework
{
public static class Function1
{
[FunctionName("Function1")]
public static async Task Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log)
{
log.Info("C# HTTP trigger function processed a request.");
string name = req.GetQueryNameValuePairs()
.FirstOrDefault(q => string.Compare(q.Key, "name", true) == 0)
.Value;
try
{
string con = @"
AuthType = ClientSecret;
ClientId = clientid;
ClientSecret = clientsec;
Url = https://crm.crm11.dynamics.com/;";
}`
Beta Was this translation helpful? Give feedback.
All reactions