-
Continue reading →: User does not have “prvSendEmail” privilage CRM 2011
Hi, In CRM 2011, while sending an email programatically you may come across “User doe not have SendAsUser Privilage” exception. (Refer useful article on How to send an email https://rajeevpentyala.wordpress.com/2011/08/03/sending-an-email-using-crm-2011-plug-in/) It would happen even all the security roles having this privilege (Refer below) To fix the issue, solution is very simple Open the…
-
Continue reading →: How to get Object Type Codes of Entities in CRM 2011
Hi, In this article i have explained different ways to fetch entities “Object Type Code” Using SQL Query :- Query> SELECT ObjectTypeCode,* FROM ENTITYVIEW Using JScript :- The “ObjectTypeCode” can be extracted from Query String using JScript “ObjectTypeCode” resides in “etc” query string parameter Below is the JScript statement to get…
-
Continue reading →: Solution with Plug-Ins import error in CRM 2011
Hi, You may get below error, when you try to import solution with Plug-in’s (or) registering a Plug-In using Plug-In registration tool Action failed for assembly ‘assemblyname,Version=1.0.0.0, Culture=neutral, PublicKeyToken=c79c3c28c5ba3ec0′: Assembly must be registered in isolation. Reason :- The User who is trying to register is not a “deployment administrator” Fix :- Add User…
-
Continue reading →: Type-cast OData Service Datetime field in crm 2011
Hi, When you read any CRM DateTime value using OData Service, the value comes in “/Date(1314763200000)/“ format, which we can’t directly set to DateTime field. Reason :- OData parses data in “Edm.DateTime” type <d:new_StartDate m:type=”Edm.DateTime”>2011-08-18T04:00:00Z</d:IBT_StartDate> How to Type Cast to DateTime :- Use below code to type cast OData DateTime type (i.e., Edm.DateTime)…
-
Continue reading →: Solution import error in CRM 2011
Hi, Sometimes you may get above error screen, when you try to import the “Solution”. Reason:- Let’s assume you have a solution “XYZ.zip” with 3 files (i.e., [Content_Types].xml, Customizations.xml & Solution.xml) Extract the “XYZ.zip” to “XYZ_new” folder Do some customization changes (i.e., Add few buttons to Ribbon) to “Customizations.xml” Save the…
-
Continue reading →: Submit disabled field using Jscript in CRM 2011
Hi, Below is the syntax to submit the disabled field value using JScript. Xrm.Page.getAttribute(“{fld_id}”).setValue(“{fld_value}”); Xrm.Page.getAttribute(“{fld_id}”).setSubmitMode(“always”) Hope it helps 🙂
-
Continue reading →: Sub Grid Refresh Event – CRM 2011
Hi, Sometimes we may need to refresh Parent form, when we Add/Remove records from sub grid (i.e., On Subgrid Refresh). We can achieve this with below steps Get the “subgrid” id (i.e., Name of the subgrid, we can get it from either ‘Form customization’ or using IE Developer Tool) In parent form, onload()…
-
Continue reading →: Get Parent Record Id from child record form + crm 2011
Hi, When you create/update a record form Associated view of Parent record, below is the JScript to “Get Parent Record Id from child record form”. //Get Parent Record Id var parentRecordID = GetUrlParameter(); parentRecordID = parentRecordID .substring(3, parentRecordID .length – 3); function GetUrlParameter() { var id = “”; var name = “_CreateFromId”; name…
-
Continue reading →: Disabling form in CRM 2011
Hi, Here is the Jscript code to disable the CRM Form (i.e., Fields on the form) function doesControlHaveAttribute(control){ var controlType = control.getControlType(); return controlType != “iframe” && controlType != “webresource” && controlType != “subgrid”; } function disableFormFields(truefalse){ Xrm.Page.ui.controls.forEach(function(control, index) { if (doesControlHaveAttribute(control)){ control.setDisabled(truefalse); } }); } How do I call this?…


