Skip to content

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

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

    Sending Email using Email Template in CRM 2011

    Published by

    Rajeev Pentyala

    on

    February 19, 2012

    Hi, Here is the sample code to send an Email using Email template name. Before start below are few keywords Template Name   (i.e., Name of the Template) Regarding Id        (i.e., GUID of the entity record which template associated with) Regarding Type   (i.e., Logical name of the entity which template associated with) ActivityParty[]     (i.e., Sender…

    Continue reading →: Sending Email using Email Template in CRM 2011
  • CRM 2011, JScript

    Retrieve record using OData and JQuery in CRM 2011

    Published by

    Rajeev Pentyala

    on

    February 12, 2012

    Hi, Below is the script to read a record using OData & JQuery function retrieveRecord(id, odataSetName) { // Get Server URL var serverUrl = Xrm.Page.context.getServerUrl(); //The OData end-point var ODATA_ENDPOINT = “/XRMServices/2011/OrganizationData.svc”; //Asynchronous AJAX function to Retrieve a CRM record using OData $.ajax({ type: “GET”, contentType: “application/json; charset=utf-8”, datatype: “json”,…

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

    Reading the GUID of record from CRM form URL

    Published by

    Rajeev Pentyala

    on

    February 9, 2012

    Hi, Below are the steps to get the GUID of record from CRM form URL. In the form ribbon, click on Copy a Link button in the Collaborate group. Paste the URL on notepad. The ‘id’ parameter in the copied URL contains the encoded id value for the record. The brackets in…

    Continue reading →: Reading the GUID of record from CRM form URL
  • CRM 2011, JScript

    Using JQuery and Json in Ribbon button’s function handler

    Published by

    Rajeev Pentyala

    on

    February 6, 2012

    Hi, In one of my CRM 2011 requirement, I had to update a record using ribbon button placed on CRM grid. I had written an update script which calls OData service using Json & JQuery. (link) But when I execute the function, I got “$ undefined” exception. I wondered since I already…

    Continue reading →: Using JQuery and Json in Ribbon button’s function handler
  • CRM 2011, JScript

    Update record using OData and JQuery in CRM 2011

    Published by

    Rajeev Pentyala

    on

    February 5, 2012

    Hi, Below is the script to update a record using OData & JQuery. I am updating an Account record in this example. function updateRecord(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”; //Asynchronous AJAX function to Update a CRM…

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

    Assign record using JScript in CRM 2011

    Published by

    Rajeev Pentyala

    on

    February 4, 2012

    Hi, Below is the Jscript to assign a record to particular User using SOAP. function AssignRecord(Assignee, Target, entityName) { var request = “<s:Envelope xmlns:s=\”http://schemas.xmlsoap.org/soap/envelope/\”>”; request += “<s:Body>”; request += “<Execute xmlns=\”http://schemas.microsoft.com/xrm/2011/Contracts/Services\””; request += ” xmlns:i=\”http://www.w3.org/2001/XMLSchema-instance\”>”; request += “<request i:type=\”b:AssignRequest\””; request += ” xmlns:a=\”http://schemas.microsoft.com/xrm/2011/Contracts\””; request += ” xmlns:b=\”http://schemas.microsoft.com/crm/2011/Contracts\”>”; request += “<a:Parameters…

    Continue reading →: Assign record using JScript in CRM 2011
  • Misc

    Closing Aspx page on PostBack by suppressing close confirmation

    Published by

    Rajeev Pentyala

    on

    February 4, 2012

    Hi, Below is the code to close the current .aspx page in the Postback (i.e., On Button click) without “Close” confirmation dialog // Close the window with no close confirmation Response.Write(“<script language=’javascript’> { window.open(”, ‘_self’, ”); window.close(); }</script>”); Hope it helps 🙂

    Continue reading →: Closing Aspx page on PostBack by suppressing close confirmation
  • 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
Previous Page Next Page
Visitors

2,149,178 hits

Top Posts
Claude Code 'VS Code' Extension: Enable 'Bypass Permissions' ModeClaude Code 'VS Code' Extension: Enable 'Bypass Permissions' ModeFebruary 5, 2026Rajeev Pentyala
Getting Started: Build Your First Power Apps Code AppGetting Started: Build Your First Power Apps Code AppAugust 27, 2025Rajeev Pentyala
[Step by Step] Beginner : Create a PCF control and add it to a custom page[Step by Step] Beginner : Create a PCF control and add it to a custom pageDecember 2, 2024Rajeev 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
  • Subscribe Subscribed
    • Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI
    • Join 478 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