Search This Blog

Showing posts with label LINQPad Plugin for Microsoft Dynamics CRM 2011. Show all posts
Showing posts with label LINQPad Plugin for Microsoft Dynamics CRM 2011. Show all posts

Wednesday, May 15, 2013

Auto Numbering for MS CRM 2011

Implementation Procedure

 

1.     Import Auto-Number solutions and publish customisation

2.     Go to setting > Auto Number

a.     Create entity record ( Make sure you create new record for each entity for which you want to use AutoNumber )

                              i.    Make sure all the required field is completed and entity name and field name is correct (us name not schema name, usually all lowercase)

This is an example:
            
Target field is a field which will hold the auto number which is generated

 

            

For adding criteria to generate AutoNumber you need to add the XML in “field Mapping” column.

The format of the XML has to be as below

 

<?xml version="1.0" encoding="utf-8"?>

<Fields>

    <Field>

      <fieldname>ownershipcode</fieldname>

      <parameter>

        <value>1</value>

        <prefix>PUB</prefix>

        <suffix></suffix>

      </parameter>

      <parameter>

        <value>2</value>

        <prefix>PRV</prefix>

        <suffix></suffix>

      </parameter>

      <parameter>

        <value>3</value>

        <prefix>SUB</prefix>

        <suffix></suffix>

      </parameter>

      <parameter>

        <value>4</value>

        <prefix>OTR</prefix>

         <suffix>INT</suffix>

      </parameter>

    </Field>

  </Fields>

 

 

In the XML above, the field is “ownershipcode” and for each different type of ownership of organization different prefix and suffix can be added.

 

 

For creating AutoNumber without any criteria you need to add the XML in “field Mapping” column.

The format of the XML has to be as below

 

<?xml version="1.0" encoding="utf-8"?>

<Fields>

    <Field>

      <fieldname>NA</fieldname>

      <parameter>

        <value>1</value>

        <prefix>COMM</prefix>

        <suffix></suffix>

      </parameter>

      </Field>

  </Fields>

 

Use the same format and in fieldname use “NA” and add your prefix and Suffix if required

This will generate not conditional Auto Numbers

 
3.     Launch plug-in register(available in CRM SDK) and connect to your deployment

4.     Add trigger in plug-in register – you will find an assembly name (Assembly) counter. Just select it

 

 
 
a.     Then under register, select new step

b.    Make sure you have created the record in Auto Number entity before you register any steps

c.     Make sure you register it as Post-operation pipeline

d.    Make sure you register step for each entity for which you want to use autonumber




 
PS : Solution and Plugin code available at codeplex

https://autonumbercrm2011.codeplex.com/


 

 

Sunday, February 13, 2011

LINQPad Plugin for Microsoft Dynamics CRM 2011

Project Description

LINQPad Plug-in for Microsoft Dynamics CRM 2011 lets you use LINQPad tool to query Microsoft Dynamics CRM 2011 with the CRM LINQ provider shipped with Microsoft Dynamics CRM 2011 SDK.
LINQPad (http://www.linqpad.net/) is a tool that may be described as "SQL Management Studio for LINQ queries”. LINQPad supports many standard .NET LINQ providers as well, as many of nonstandard ones. This project is intended to add support for the Microsoft Dynamics CRM 2011 LINQ-to-CRM provider.

Connect to Microsoft Dynamics CRM 2011 – Online or OnPremise - browse entity schema, write and execute LINQ-to-CRM queries.

Features
1) Support of all Microsoft Dynamics CRM 2011 deployment types: Online, OnPremise and SPLA
2) Entity schema browsing – navigating through entity sets, entity attributes and relationships
3) Writing and executing LINQ queries against entity sets
4) Examining QueryExpression used for actual data retrieval

Installation instructions
1) Make sure you have .NET Framework 4.0 and Windows Identity Foundation installed
2) Download and install LINQPad for .NET Framework 4.0 from http://www.linqpad.net
3) Download CrmLINQPadPlugin.lpx from ‘Downloads’ section of this page
4) Run LINQPad and register the plugin – go to "Add Connection\View More Drivers\Browse" and select CrmLINQPadPlugin.lpx
5) To create a CRM connection, click "Add Connection" and select "MS CRM 2011" in "Use a typed data context from your own assembly" section

Screenshots

screenshot1.png

screenshot2.png

screenshot3.png