Tuesday, September 29, 2020

MSCRM+ on premise plugin error + could not find default endpoint element that references contract

 Hi All,


If you get error with could not find default endpoint element that references contract


while trying in Plugins or Workflow Activity

Please use below code in your code


BasicHttpBinding myBinding = new BasicHttpBinding();

                myBinding.Name = "BasicHttpBinding_Service";

                myBinding.Security.Mode = BasicHttpSecurityMode.None;

                myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;

                myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;

                myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;


                // Endpoint Address defining the asmx Service to be called.

                EndpointAddress endPointAddress = new EndpointAddress(@"http://yourwebservice.com/sms_ws/Service.asmx");


                // Call to the Web Service using the Binding and End Point Address.

                SendSMS.ServiceSoapClient myClient = new SendSMS.ServiceSoapClient(myBinding, endPointAddress);

Monday, September 21, 2020

HttpClient + GUID Create Record Mscrm C#

 HttpClient httpClient = GetHttp().Result;

            //var appSettings = ConfigurationManager.AppSettings;

            String apiUrl = "https://ORG.crm4.dynamics.com/api/data/v9.1/";

            JObject idea = new JObject();

  idea.Add("admin_BusinessPoint@odata.bind","/systemusers("+ getUserGuid.Result.ToString().Replace("}","").Replace("{","") + ")");


PASS CRM FIELD INSTED LOGICAL NAME

response.Content.ReadAsStringAsync().Result - retrieve values

Convert 


var retrievedcontact1 = response.Content.ReadAsStringAsync().Result;

                dynamic data = JObject.Parse(retrievedcontact1);

                RootObject objects = JsonConvert.DeserializeObject<RootObject>(response.Content.ReadAsStringAsync().Result);


public class Value

        {

            [JsonProperty("@odata.etag")]

            public string etag { get; set; }

            public string systemuserid { get; set; }

            public string ownerid { get; set; }

        }


        public class RootObject

        {

            [JsonProperty("@odata.context")]

            public string context { get; set; }

            public List<Value> value { get; set; }

        } 

Thursday, September 10, 2020

Trigger Workflow MSCRM c#

var executeWorkflowRequest = new ExecuteWorkflowRequest()  

{  

  WorkflowId = Guid.Parse(""), // Guid of workflow  

  EntityId = Guid.Parse("") // Guid of record  

};              

var executeWorkflowResponse =(ExecuteWorkflowResponse)orgService.Execute(executeWorkflowRequest); 

How to Import Data from Excel to Multiple tables in PowerApps

Introduction:   I have created a view on how to import data from excel to multiple tables in Canvas PowerApps   Implemented Steps: ...