Thursday 4 July 2013

Load Json,JQuery from Home page of MSCRM 2011


Hi All,

This is Sudhakarreddy Chidipudi


Now i  will explain how to load Json,JQuery scripts from homepage grid of CRM Entity.
Every ribbon button has Command Definition .We can load the script files from this Command Definition of actions tags.

Below is the example to load the script files form home page grid.

    <CommandDefinition Id="Mscrm.HomepageGrid.SudhakarReddyLoadScripts">
      <EnableRules>
      </EnableRules>
      <DisplayRules>
      </DisplayRules>
      <Actions>
        <JavaScriptFunction FunctionName="$" Library="$webresource:sudhakar_jSon" />
        <JavaScriptFunction FunctionName="$" Library="$webresource:sudhakar_jQuery" />
        <JavaScriptFunction FunctionName="MyTest" Library="$webresource:sudhakar_Functions">
        </JavaScriptFunction>
      </Actions>
    </CommandDefinition>



Have a nice day:)
Sudhakarreddy Chidipudi

Default form data values using QueryString arguments

                                       SudhakarReddy Chidipudi
 
Hi All,

 Sometimes you may have to open a new CRM from using Query String arguments with default values

We can achieve by using extraq parameter in url

1)Set the default Value for Lookup

To open a new record with default values then below syntax you can use,

Below is the example of opening primary contact of account ,

I have a contact with the name of "Sudhakar Reddy Chidipudi".I want to open the account form with the default contact is "Sudhakar Reddy Chidipudi".

https://anjali.crm.dynamics.com/main.aspx?etc=1&pagetype=entityrecord&extraqs=primarycontactid%3D{ Here you have to provide your record id }%26primarycontactidname%3D Name of your record.

%3D Represents equal(=) and %26 represents &.

2)To open the new record with default name

https://anjali.crm.dynamics.com/main.aspx?etc=1&extraqs=name%3DSudhakarReddyChidipudi&pagetype=entityrecord

Have a nice day :)

Sudhakar Reddy Chidipudi