Skip to content

Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI

    • About
    • DEV Tools
  • CRM 2011, Plug-Ins

    Activate or Deactivate record in CRM 2011

    Published by

    Rajeev Pentyala

    on

    October 18, 2011

    Hi, We can Activate\Deactivate record using “SetStateRequest“. Below is the code snippet. private void SetEntityStatus(IOrganizationService service, Guid recordGUID, string entityName)        { SetStateRequest setState = newSetStateRequest(); setState.EntityMoniker = newEntityReference(); //Pass GUID of the record to be activated or Deactivated setState.EntityMoniker.Id = recordGUID; setState.EntityMoniker.Name = entityName; setState.EntityMoniker.LogicalName = entityName; //Setting ‘State’ i.e., (0 – Active ; 1 – InActive)…

    Continue reading →: Activate or Deactivate record in CRM 2011
  • CRM, CRM 2011, CRM 4.0, JScript

    Set field values using query string parameters on Form load in CRM

    Published by

    Rajeev Pentyala

    on

    October 11, 2011

    Hi, I have got below requirement,  I need to open a CRM form from my custom ‘.aspx’ page. On opening of the form I should populate “name” field with value After referring MSDN article, I came to know that we can set the field values using “extraqs” query string parameter and it must meet below…

    Continue reading →: Set field values using query string parameters on Form load in CRM
  • CRM, CRM 2011, JScript

    Execute the workflow from JScript In CRM

    Published by

    Rajeev Pentyala

    on

    October 2, 2011

    Hi, We can run the CRM workflows from JScript, if we know the GUID of the workflow. Below are the execution steps. Steps :- Get the GUID of workflow from name using OData Service  (i.e., Using GetWorkflowIDByName(wfName) function ) Execute the Workflow using the GUID (i.e., Using TriggerWorkflow(workflowGuid) function) Below are the JScript…

    Continue reading →: Execute the workflow from JScript In CRM
  • CRM 2011

    Unexpected error while bulk edit

    Published by

    Rajeev Pentyala

    on

    September 22, 2011

    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 →: Unexpected error while bulk edit
  • CRM, CRM 2011, CRM 4.0, Plug-Ins

    Missing prvReadAsyncOperation privilege exception

    Published by

    Rajeev Pentyala

    on

    September 21, 2011

    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 →: Missing prvReadAsyncOperation privilege exception
  • CRM 2011, Plug-Ins

    Check user security role in Plug-ins CRM 2011

    Published by

    Rajeev Pentyala

    on

    September 20, 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 →: Check user security role in Plug-ins CRM 2011
  • CRM 2011, CRM 4.0, JScript

    How to change CRM form field’s label text and color using Jscript

    Published by

    Rajeev Pentyala

    on

    September 15, 2011

    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 →: How to change CRM form field’s label text and color using Jscript
  • CRM 2011, Plug-Ins

    Read Optionset value in Plugin CRM 2011

    Published by

    Rajeev Pentyala

    on

    September 14, 2011

    Hi,   Below is the sample code to read Picklist value (i.e., OptionSet Value) in CRM 2011 if (context.InputParameters.Contains(“Target”) && context.InputParameters[“Target”] isEntity) { currEntity = (Entity)context.InputParameters[“Target”]; } int statusValue = -1; string statusText=string.empty; if (currEntity .Attributes.Contains(“statecode”)) { OptionSetValue optionState = currEntity .Attributes[“statecode”] as OptionSetValue; statusValue = optionTimesheetState.Value; statusText = optionTimesheetState.Text;…

    Continue reading →: Read Optionset value in Plugin CRM 2011
  • SQL

    Case statement in Select clause

    Published by

    Rajeev Pentyala

    on

    September 13, 2011

    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 →: Case statement in Select clause
  • CRM 2011, Processes

    Workflows/Dialogs ownership in CRM 2011

    Published by

    Rajeev Pentyala

    on

    September 10, 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 →: Workflows/Dialogs ownership in CRM 2011
Previous Page Next Page
Visitors

2,152,922 hits

Top Posts
Getting Started: Build Your First Power Apps Code AppGetting Started: Build Your First Power Apps Code AppAugust 27, 2025Rajeev Pentyala
Claude Code 'VS Code' Extension: Enable 'Bypass Permissions' ModeClaude Code 'VS Code' Extension: Enable 'Bypass Permissions' ModeFebruary 5, 2026Rajeev Pentyala
Power Pages | Build a Site Using 'Claude Code' and the 'Power Pages Plugin'Power Pages | Build a Site Using 'Claude Code' and the 'Power Pages Plugin'March 15, 2026Rajeev Pentyala

Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI

  • Pinterest
  • Instagram
  • Facebook
  • Mail
    • About
    • DEV Tools

Create a free website or blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI
    • Join 480 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar

Notifications