-
Continue reading →: Unexpected error while bulk edit
Hi, You may come across below error screen when you try to bulk edit records. When you verify the event viewer for issue log, you may observe “Message: INVALID_WRPC_TOKEN: Validate WRPC Token: WRPCTokenState=Invalid” . Reason:- The fundamental problem is that CRM 2011 now expects additional parameters on the query string that contain a Token…
-
Continue reading →: Missing prvReadAsyncOperation privilege exception
Hi, Today my plug-in has thrown “Missing prvReadAsyncOperation privilege ” exception for user with one of the security role. Fix:- We need to grant Read Priveliege of System Job for the security role Open the Security Role and go to Customization tab Refer below screen Hope it helps 🙂
-
Continue reading →: Check user security role in Plug-ins CRM 2011
Hi, Below is the code snippet to check current user security role in Plug-in. private void CheckUserRole(IOrganizationService service, Guid userID) { QueryExpression query = new QueryExpression(); query.EntityName = “role”; //role entity name ColumnSet cols = new ColumnSet(); cols.AddColumn(“name”); //We only need role name query.ColumnSet = cols; ConditionExpression ce = new ConditionExpression(); ce.AttributeName = “systemuserid”; ce.Operator = ConditionOperator.Equal; ce.Values.Add(userID); //system roles LinkEntity linkRole = new LinkEntity(); linkRole.LinkFromAttributeName…
-
Continue reading →: How to change CRM form field’s label text and color using Jscript
Hi, Below is the sample JScript to change the color and text of CRM form field’s label; Place the code in JScript “onload” event // To change color if(crmForm.all.new_fieldname != null) { var field = crmForm.all.new_fieldname_c; //”_c” is the caption (i.e.,Label) if (field != null) field.style.color = ‘gray’; //Specify your…
-
Continue reading →: Case statement in Select clause
Hi, Below is a sample query that has “CASE statement” in SELECT clause SELECT EmpID, CASE WHEN Salary>=2000 THEN ‘High Salaried’ WHEN Salary<=1000 THEN ‘Medium’ ELSE ‘Below Bar’ END ‘New Column’, * FROM Employee Below is the screenshot for reference Hope it helps 🙂
-
Continue reading →: Workflows/Dialogs ownership in CRM 2011
Hi, Today i have come across useful article on “Ownership of Workflows ” below are few excerpts Q> Under what user’s context does the workflow execute? (If the workflow creates a record, who will be the owner of that new record?) Automatically triggered workflows (such as a workflow that triggers…
-
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…


