Script

Wednesday, November 20, 2019

Javascript : Accessing Query String Parameters

The below script is to get the query string values passed to CRM web resource,
       
function parseQueryString(qs, opts) {
    var queryString = qs || window.location.search || "";
    var queryStringRegularExpression = /(?:\?|&|^)([^=]+)=([^&]*)/ig;
    var qsMatch = queryStringRegularExpression.exec(queryString);
    var paramKey;
    var paramVal;
    while (!!qsMatch) {
        paramKey = decodeURIComponent(qsMatch[1] || "").toLowerCase();
        paramVal = decodeURIComponent(qsMatch[2] || "");
        if ((paramKey === "data") && !!paramVal) {
            parseQueryString(paramVal, opts);
        } else if (!!paramKey && !!paramVal) {
            opts[paramKey] = paramVal;
        }
        qsMatch = queryStringRegularExpression.exec(queryString);
    }
}
       
 
Usage of Query String method :
       
var qsOptions = {};
parseQueryString(location.search, qsOptions);
 
// Get your parameters here
var name = qsOptions.name;
var country = qsOptions.country;
       
 
Sample Webresource URL
       
http://servername/WebResources/new_/AccesingQueryString.htm?Data=name%3DfullName%26country%3DIndia

 

Tuesday, November 19, 2019

D365 CE : Switching Between Unified Interface and Classic Web Client


"Use Unified Interface only" option is no more available in Dynamics CE System Settings.

To view application in classic web client, settings can be changed only through Admin Centre, Please check the steps below,

Step 2 : Navigate to Environments
Step 3 : Select the respective environment and click Settings
Step 4 : Expand Product and select Behaviour
Step 5 : Enable/Disable "Use Unified Interface only"
Step 6 : Click Save



Thursday, April 11, 2019

{Fix} Error : SYSTEM POPULATED FIELD FOR THE XML REPRESENTATION OF THE LAYOUT OF THE FORM OR DASHBOARD

Error : Importing solution in CRM throws “system populated field for the xml representation of the layout of the form or dashboard”

Solution:
When you get this error,follow the below steps to get this resolve,
  • Note the entity name from import customization window
  • Compare the custom fields schema name between source and target environment
           for e.g
            Source environment : crm_CustomField
            Target environment : crm_customfield

Note that field name between source and target environment are vary in above step,where C and F are caps in source and its small letters in target environment,this cause the import issue

  • List down the conflict fields
  • Recreate the fields and make sure fields are sync between source and target environment
            for e.g
              Source environment : crm_CustomField
              Target environment : crm_CustomField