-
Continue reading →: “Translations file is invalid” error while importing translations in CRM 2011
Hi, The other day, When I tried to import Translations (i.e., RajTranslations.zip folder with ‘Content_Types.xml & CrmTranslations.xml’ files), I was getting below exception Translations file is invalid. The compressed file must contain the following files in your root “[Content_Types].xml” and “CrmTranslations.xml” Reason:- The reason for this error was I zipped…
-
Continue reading →: Excel completed file level validation and repair – message while opening excel file
Hi, In one of my XRM implementation i used OpenXML.sdk to read/write excel files. I was getting below screen while opening the created excel file from .aspx page. Here is the code Iused to pop the excel file from .aspx page Response.ClearHeaders(); Response.ClearContent(); Response.ContentType = “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml”; Response.AddHeader(“Content-Disposition”, “sample.xlsx”); Response.BinaryWrite(outputFileBytes); Response.Flush(); Response.End(); Fix :- There…
-
Continue reading →: Reading option set using JScript in CRM 2011
Hi, Below is the Jscript functions to read “Option set” and get the option text by option value. In this approach I have 3 methods and details are below getOptionSet() – Returns optionset object Parameters Entity Name (Entity logical name) Attribute Name (i.e., Option set field name) retrieveAsIfPublished (True/False) getTextByValue()…
-
Continue reading →: “Could not create type” error while browsing a web service
Hi, You may come across below error after you deploy a web service application on IIS and try to browse the .asmx file. Fix :- Below are few reasons that cause this issue Check your Application Pool of your hosted site is of .Net Framework 2.0 or higher Verify all your web service …
-
Continue reading →: Fields that are not valid were specified for the entity – Solution Import Error in CRM 2011
Hi, In one of my CRM 2011 deployments when I tried to import my solution from Development to Test environment I got below error Fields that are not valid were specified for the entity After examining the customization changes made we came to know the actual problem. Reason – We had an…
-
Continue reading →: Using Regular Expression and JScript to validate phone no format
Hi, I got a requirement to validate a CRM field with “Indian Telephone Number” format (i.e., 040-1234567). I opted to use regular expression and Jscript for format validation. Below is the JScript function function businessPhoneOnChange() { var telephone = Xrm.Page.data.entity.attributes.get(“telephone1”); // Regular expression with Indian Telephone format var regExp= /^[0-9]\d{2,4}-\d{6,8}$/; if…
-
Continue reading →: Creating OrganizationServiceProxy in CRM2011 custom applications
Hi, Below are the steps to instantiate “Organization Service Proxy” which can be used to consume CRM service and perform operations in a custom application – Refer “Microsoft.Xrm.Sdk & Microsoft.Xrm.Sdk.Client” .dll’s to your custom application using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Client; using System.Net.Security; using System.ServiceModel.Description; using System.Security.Cryptography.X509Certificates; private Uri homeRealmUri = null; private ClientCredentials credentials; private Uri organizationUri; private…
-
Continue reading →: Reading Language Code (LCID) in CRM 2011
Hi, Here is the JScript to get the LCID (Locale Id) of User & Organization Base Language var currUserLcid = Xrm.Page.context.getUserLcid(); var orgLcid= Xrm.Page.context. getOrgLcid(); Below is the MSDN link contains list of LCID (Locale Id’s) of CRM 2011 CRM 2011 LCID Chart Hope it helps 🙂…
-
Continue reading →: Deleting a record using OData & JQuery in CRM 2011
Hi, Below is the script to delete record using OData & JScript function deleteRecord(id, odataSetName) { // Get Server URL var serverUrl = Xrm.Page.context.getServerUrl(); //The OData end-point var ODATA_ENDPOINT = “/XRMServices/2011/OrganizationData.svc”; //Asynchronous AJAX function to Delete a CRM record using OData $.ajax({ type: “POST”, contentType: “application/json; charset=utf-8”, datatype: “json”,…


![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)