Skip to content

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

    • About
    • DEV Tools
  • CRM 2011

    Reading Optionset using CRM 2011 IOrganizationService

    Published by

    Rajeev Pentyala

    on

    February 3, 2012

    Hi, Below is the code to read “Optionset” using CRM 2011 IOrganizationService. Below logic reads the Optionset and returns “KeyValue” list (Key = Option Label; Value = Option Value) using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Client; using Microsoft.Xrm.Sdk.Query; using Microsoft.Xrm.Sdk.Messages; using Microsoft.Xrm.Sdk.Metadata;   public List<KeyValuePair<string, int>> GetOptionSet(string entityName, string attributeName, IOrganizationService service) { var optionSet =…

    Continue reading →: Reading Optionset using CRM 2011 IOrganizationService
  • CRM 2011, Misc

    New window is opening up on button click in modal dialog

    Published by

    Rajeev Pentyala

    on

    February 1, 2012

    Hi, In one of my requirement, I am opening an “.aspx” page in modal dialog on CRM ribbon button click. My .aspx page has a button and when I click on the button , The same page is opening up in another window Fix :- Add “base target=”_self” tag to the .Aspx page’s…

    Continue reading →: New window is opening up on button click in modal dialog
  • CRM 2011, JScript

    Create record using OData and JQuery in CRM 2011

    Published by

    Rajeev Pentyala

    on

    January 29, 2012

    Hi, Below is the code snippet to create a record (i.e., Account) using OData & JQuery. //Prepare ‘Account’ object and call create function function createAccount() { //Create an object to represent an Account record and set properties var account = new Object(); // Set text field account.Name = “Rajeev Pentyala”; // Set…

    Continue reading →: Create record using OData and JQuery in CRM 2011
  • JScript

    Reading Querystring using Jscript

    Published by

    Rajeev Pentyala

    on

    January 24, 2012

    Hi, Below is the Jscript function to parse query string (i.e., In to Parameter & Value pair) // Read querystring and returns Parameter & Value pair Array function fetchQueryStringParams() { var qrStr = window.location.search; var spQrStr = qrStr.substring(1); var arrQrStr = new Array(); // splits each of pair var arr…

    Continue reading →: Reading Querystring using Jscript
  • Misc

    You must use the Role Management Tool to install .Net Framework Exception

    Published by

    Rajeev Pentyala

    on

    January 19, 2012

    Hi, Today I got below error screen when I try to install .Net 3.5 Framework SP1 on my WIN 2008 R2 server .   Reason :- Windows 2008 R2 natively ships with the .NET 3.5 SP1 framework. So, it wont allow us to run the .Net 3.5 framework setup file. Workaround :- As Windows 2008…

    Continue reading →: You must use the Role Management Tool to install .Net Framework Exception
  • CRM 2011, Plug-Ins

    Fetching user security roles using Linq in CRM 2011 Plug-in’s

    Published by

    Rajeev Pentyala

    on

    January 17, 2012

    Hi, Below is the sample code to fetch the User’s security roles based on the “User Id” in the Plug-in’s using Linq         /// <summary> /// Returns the list of User security role names /// </summary> private List<string> GetUserRoles(IOrganizationService service, Guid userId) { // Create Query Expression to fetch Role Entity var query = new QueryExpression…

    Continue reading →: Fetching user security roles using Linq in CRM 2011 Plug-in’s
  • CRM 2011, Plug-Ins

    Setting default view using Plug-in’s in CRM 2011

    Published by

    Rajeev Pentyala

    on

    January 17, 2012

    Hi, We often get the requirement to set a default view based on some criteria (Ex – Could be based on logged in user role, etc…). We can achieve this using a Plug-in. Little insight :- When you click on an entity (i.e., ‘Contacts’ in my sample) in CRM application, In…

    Continue reading →: Setting default view using Plug-in’s in CRM 2011
  • CRM 2011, Plug-Ins

    How to Debug Plug-Ins in CRM

    Published by

    Rajeev Pentyala

    on

    January 13, 2012

    Hi, Sometimes you might get wonder (even frustrated) why the debugger is not hitting the break point in your Plug-In code file. Below are the Checklist to perform prior to start the debugging of your Plug-in assembly. Ensure that your plug-in assembly is signed (See) Rebuild the plug-in assembly Reset the IIS (i.e. Open…

    Continue reading →: How to Debug Plug-Ins in CRM
  • CRM 2011, Plug-Ins

    Auto numbering logic in CRM 2011

    Published by

    Rajeev Pentyala

    on

    January 11, 2012

    Hi, Auto numbering feature is one of the most frequently asked requirement in CRM projects and below is the sample. In my sample, I am going to generate an auto number to the each ‘Contact’ that create under a particular ‘Account’. The auto number format will be “Contact – 001, Contact – 002,….”. To achieve the above requirement,  I am…

    Continue reading →: Auto numbering logic in CRM 2011
  • CRM 2011

    Entities display area not getting set on Solution Import in CRM 2011

    Published by

    Rajeev Pentyala

    on

    January 10, 2012

    Hi, Please observe below scenario In my CRM organization “ORG – A I Created a new custom entity “new_city” and I set “Area to display” as “Workplace”. I created a new “Managed” solution “Sol – I” having the custom entity “new_city” Now In my Organization “ORG – B”, I imported the solution “Sol – I” successfully. Issue…

    Continue reading →: Entities display area not getting set on Solution Import in CRM 2011
Previous Page Next Page
Visitors

2,152,842 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

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
 

Loading Comments...
 

    • 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