-
Continue reading →: Delete record synchronously using OData and JScript in CRM 2011
Hi, Below is the script to delete record synchronously function deleteRecordSync(recordId, odataSetName) { // Get Server URL var serverUrl = Xrm.Page.context.getServerUrl(); //The OData end-point var ODATA_ENDPOINT = “/XRMServices/2011/OrganizationData.svc”; var deleteRecordReq = new XMLHttpRequest(); var ODataPath = serverUrl + ODATA_ENDPOINT; deleteRecordReq.open(‘POST’, ODataPath + “/” + odataSetName + “(guid’” + recordId +…
-
Continue reading →: Update record synchronously using OData and JScript in CRM 2011
Hi, Below is the Jscript function to update record synchronously using OData and Jscript function updateRecordSync(id, entityObject, odataSetName) { var jsonEntity = window.JSON.stringify(entityObject); // Get Server URL var serverUrl = Xrm.Page.context.getServerUrl(); //The OData end-point var ODATA_ENDPOINT = “/XRMServices/2011/OrganizationData.svc”; var updateRecordReq = new XMLHttpRequest(); var ODataPath = serverUrl + ODATA_ENDPOINT; updateRecordReq.open(‘POST’,…
-
Continue reading →: Create record synchronously using OData and JScript in CRM 2011
Hi, Below is the Jscript function to create record synchronously using OData and Jscript function createRecordSync(entityObject, odataSetName) { var jsonEntity = window.JSON.stringify(entityObject); // Get Server URL var serverUrl = Xrm.Page.context.getServerUrl(); //The OData end-point var ODATA_ENDPOINT = “/XRMServices/2011/OrganizationData.svc”; var createRecordReq = new XMLHttpRequest(); var ODataPath = serverUrl + ODATA_ENDPOINT; createRecordReq.open(‘POST’, ODataPath…
-
Continue reading →: Pass parameters to the report hosted in IFrame or Web Page
Hi, Assume you have to display related ‘contacts’ of an ‘Account’ in the report hosted in an IFrame. You can prepare a dataset using below query in the report SELECT * FROM FilteredContact C WHERE C.accountid=@CRM_AccountId To set parameter ‘@CRM_AccountId‘, you can pass parameter in the URL in this format…
-
Continue reading →: Disabling sub grid using jscript in CRM 2011
Hi, We can’t disable sub grid using out of the box “setDisabled” method. But there is an unsupported way to disable the grid. Actually sub grid renders as HTML Span, so we can disable the span using below function function disableSubgrid(subgridName) { var subGrid = document.getElementById(subgridName + “_span”); if (subGrid) {…
-
Continue reading →: Intellisense feature in Sql server management studio 2008 R2 stopped working – Fix
Hi, You might have lost the Intellisense in ‘Sql server management studio 2008 R2’ after you installed Visual studio 2010 Sp1. This is a known issue and it got fixed after I installed “Service Pack 1” of Sql server from below link Download When you click the above link, from the…
-
Continue reading →: Get and Set ‘Partylist’ fields using Jscript
If you observe “Required” lookup field on an ‘Appointment’ form, you can choose more than one Accounts or Contacts or Users. Though it looks like a normal lookup field actually it’s a field of type ‘Party list’. Party List :- Party List is a data type in CRM, using which you…
-
Continue reading →: Associating entities with n:n relationship using Jscript
Hi, Below is the Jscript to associate two entity records, which are having (N:N) relationship. function AssociateEntities(relationshipSchemaName, entity1Name, entity1Id, entity2Name, entity2Id) { var xmlSoapBody = “<Execute xmlns=’http://schemas.microsoft.com/crm/2007/WebServices’>” + ” <Request xsi:type=’AssociateEntitiesRequest’>” + ” <Moniker1>” + ” <Name xmlns=’http://schemas.microsoft.com/crm/2006/CoreTypes’>” + entity1Name + “</Name>” + ” <Id xmlns=’http://schemas.microsoft.com/crm/2006/CoreTypes’>” + entity1Id + “</Id>” +…
-
Continue reading →: Could not load type System.ServiceModel.Activation.HttpModule exception
Hi, I was getting below exception, When I hosted my asp.net web application on IIS and tried to browse my .aspx page. Reason :- The reason could be, when the IIS is installed after the installation of .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after…


