Search This Blog

Monday, October 21, 2019

Business Rule not Triggering

Business Rule not Triggering

If business rule is not trigger then check whether configuration on the business rule fields is available on form. If any one of the field not available then whole business wont trigger.

Wednesday, October 9, 2019

Enable CORS any URL

By joining your URL with the below it will enable cors.
https://cors-anywhere.herokuapp.com/

  var proxy = 'https://cors-anywhere.herokuapp.com/';

        var URL = ""URL";
        //Your URL
        // alert(URL);
        $.ajax({
            type: 'GET',
            async: "false",
            start_time: new Date().getTime(),
            url: proxy + URL,

});

Friday, June 7, 2019

PowerShell Script Not Digitally Signed

PowerShell Script Not Digitally Signed

Run the below commands in the powershell


Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
“Bypass” means nothing is blocked and no warnings, prompts, or messages will be displayed.

Thursday, June 6, 2019

Upgrade Dynamics CRM 2016 on-premise to Dynamics 365

The required anti-forgery cookie "__RequestVerificationToken" is not present.

The required anti-forgery cookie "__RequestVerificationToken" is not present.

To solve this issue:
1)Check on the web config file
if you have
<httpCookies  requireSSL="true" httpOnlyCookies="true"/>
then remove the requireSSL=true
<httpCookies  httpOnlyCookies="true"/>

2) Check if you [ValidateAntiForgeryToken] attribute used in Get Method if used then removed it also.

Tuesday, May 28, 2019

New button is not enabled in Active Bookable Resource form Unified Interface

New button is not enabled in Active Bookable Resource form Unified Interface



Setting->Customization->BookableResource Entity, On the outlook and Mobile section "UnCheck the Read only in mobile"

Monday, May 27, 2019

Run workflow is missing on Dynamics CRM Unified Interface

Run workflow is missing on Dynamics CRM Unified Interface

It is moved under the Flow


Setting is not available in Dynamics 365 CRM Unified interface(new version)

Setting is not available in Dynamics 365 CRM Unified interface(new version)

Open the any CRM click setting wheel icon on the top right corner, where you can find the Advance setting. It will open the CRM setting customization page.



Friday, May 24, 2019

Download/Edit existing word template from Dynamics 365

Download/Edit existing word template from Dynamics 365

There is no direct ways to download the existing download template in Dynamics CRM. In order to do that it we can do it from SDK code.


            Guid templateId = new Guid("3AE567D9-BEB5-E711-8147-E0071B6AE051");
            Entity objDocTemplate = objService.Retrieve("documenttemplate", templateId, new ColumnSet(true));

            if (objDocTemplate != null && objDocTemplate.Attributes.Contains("content"))
            {
                var ms = new MemoryStream(Convert.FromBase64String(objDocTemplate["content"].ToString()));
                var fs = new FileStream(@"C:\LOAWordTemplate.docx", FileMode.CreateNew);
                ms.CopyTo(fs);
                fs.Flush();
                fs.Close();
            }

Tuesday, May 21, 2019

Remove/Hide the Assistance tab from Dynamics 365 CRM

Remove/Hide the Assistance tab from Dynamics 365 CRM

If you want to remove/hide the assistance tab in Dynamics 365 CRM. You can do either uncheck base cards from Settings->Sales AI->Assistance or do coding

In the Organizations entity set the "ispreviewenabledforactioncard" as false

Monday, May 13, 2019

Agreement Booking Date is not generating for monthly recurrence in field service

Agreement Booking Date setup(Recurrence)

When we configure as monthly booking date is not generating.


Solution:
The recurrence start and end date must be fall in between agreement start and end date.





Tuesday, March 5, 2019

In order to access security critical code, this assembly must be fully trusted.Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain. To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions

While using JavaScriptSerializer class (referencing System.Web.Extension dll in the plugin project) the below error thrown at the run time.

In order to access security critical code, this assembly must be fully trusted.
                     Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain. To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions

Solution:


  JavaScriptSerializer jss = new JavaScriptSerializer();  
           dynamic obj = jss.Deserialize<dynamic>(responsebody);  
           string token = obj["access_token"];  

 Instead of Above Code:
 public class AccessToken
    {
        public string access_token { get; set; }
    } 
using (var memorystream = new MemoryStream())  
           {  
             var deserializer = new DataContractJsonSerializer(typeof(AccessToken));  
             StreamWriter writer = new StreamWriter(memorystream);  
             writer.Write(responsebody);  
             writer.Flush();  
             memorystream.Position = 0;  
             AccessToken deserializedResult = (AccessToken)deserializer.ReadObject(memorystream);  
             string token1 = deserializedResult.access_token;  
           }