Search This Blog

Wednesday, January 2, 2013

Debug Plugins on your local PC without Remote Debugger


1.       Download Latest MS CRM 2011 SDK ( latest version has Plugin Profiler Implemented)

2.       Click on Install Profiler on Menu Bar ( if it is not installed in your plugin registration tool )

3.       You will find a new node added to your plugin registration tool


4.       Select your plugin step from your plugin and Enable Plugin Profiling



 5.       After enabling profile the screen will look like as below



 6.       Once your plugin step is in profile mode, start your MS CRM and fire the plugin from MS CRM, and Download and save the log file generated by profiling action at one location.

7.       In Visual Studio open your plugin and attach the to Process “Plugin Registration.exe” , and add breakpoint in your code where you want to start debugging.

8.       Then Click on Debug option in your plugin registration tool , you  will see the window as below

 
 



 

9.       In the Profile Location section please provide the file path which you have download at the time of firing plugin , also provide the name of the file in the path

10.   In the second option provide path of your Assembly file along with filename

11.   In the same section after providing the file name select the plugin you want to debug



 

12.   Click on “Start Plug-in Execution” button

13.   This will start the execution of your plugin and it will step into your code at the debug point



 

Your screen with debugging will look like as above

Happy debugging plugin for any MS CRM server without remote debugger or Visual Studio to be installed on MS CRM server

 

Thursday, October 4, 2012

CRM 2011: Xrm.Utility.openEntityForm

Opening a Existing or New entity record using openEntityForm

Following example shows opening a existing Quote record with required parameters

var parameters = {};
parameters["quoteid"] = quoteid;
parameters["lineitemnumber "] = "1";
parameters["quantity"] = "10";

Xrm.Utility.openEntityForm("quotedetail", null, parameters);

Hope this helps

Regards,
Vilas

Creating Custom Workflow Activity - Sample

To create a custom activity that inherits from CodeActivity

  1. Start Microsoft Visual Studio 2010.
  2. On the File menu, click New, and then click Project.
  3. In the New Project dialog box, select Workflow under Visual C# in the Installed Templates pane, and then select Activity Library.
  4. Specify a name and location for the solution, and then click OK.
  5. Navigate to the Project menu and select Properties. On the Application tab, specify .NET Framework 4 as the target framework.
  6. Add references to the Microsoft.Xrm.Sdk.dll and Microsoft.Xrm.Workflow.dll assemblies.
  7. Delete the Activity1.xaml file in the project.
  8. Add a class file (.cs) to the project. In Solution Explorer, right-click the project, select Add, and then click Class. In the Add New Item dialog box, type a name for the class, and then click Add.

Below is sample code for Cusotm workflow activity which will Accept 2 integeres as parameter and output will be total

namespace CreateEpiXml
{
    public class createEPIXML : CodeActivity
    {
        [Input("Enter First Number")]
        public InArgument<Int32> FirstNumber { get; set; }

        [Input("Enter Second Number")]
        public InArgument<Int32> SecondNumber { get; set; }

        [Output("Total")]
        public OutArgument<Int32> Total { get; set; }


        protected override void Execute(CodeActivityContext context)
        {
            int fn = FirstNumber.Get<Int32>(context);
            int sn = SecondNumber.Get<Int32>(context);
            int total;
            total = fn + sn;
            Total.Set(context, total);

        }
    }
}

Sign the workflow assembly with .snk file ( similar to plugin )

Compile the project to create an assembly (.dll).

Register your custom workflow activity using Plugin Registration tool and u can access your activity from workflow / dialogs for execution.

using that custom workflow activity from workflow or dialog , you can pass this 2 integer numbers and read the output back in workflow/dialog.

Hope this helps

Vilas


 

Sunday, February 13, 2011

Convert to managed solution functionality

After our initial CRM 2011 Beta release, MS added new functionality that will allow you to convert unmanaged customizations to managed solution components in organizations upgraded from CRM 4 to CRM 2011. This will help you to convert unmanaged customizations to managed solutions in your existing customers’ upgraded organizations.

When a managed solution is imported, if any components in the managed solution are already installed in the organization as unmanaged, you will be prompted to convert the components to managed as part of the import process. For full details, please see the “Upgrade Your Customizations from Microsoft Dynamics CRM 4.0” section in the latest SDK documentation.

This functionality has been made available in the recently released beta patch (already applied to CRM 2011 Online Beta organizations and available for download for on-premise organizations).

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

why can't new the Topic attribute map in Lead's account_originating_lead relationship?

Problem :

I want the "Topic" data to automatically pull over from the lead record when the lead is converted to an account. I created a new attribute called "Originating topic" on Account form (type, format, and length are all same as Lead's topic attribute). And then try to create a mapping for it in Lead's account_originating_lead relationship, but it always pops up an error stating this attribute map is invalid. A vaild attribute map must meet these requirements: - The data type must match. - The length of the target attribute cannot be shorter than the source attribute. ....
I am sure the map meets those requirements.  And I created a map for another attribute, it works.
so I was wondering why the map for "topic" cannot be created. how do I solve this?
Appricate any advice.

Soln :
Both the Source and Target fields have to be published on the forms for their entities.  But you know what?  That's not enough.  Why?  Because CRM is lying to you .  Open your Metadata Browser to the following location, and tell me what you see for the "Subject" field:
http://<crm server>/<org>/sdk/mdbrowser/entity.aspx?entity=lead
The length is different, isn't it?  Why?  Because CRM is superior to you in every way, and it wants to make you feel like a small boy in the middle of a Civil War.  Apparently there's a mismatch in what the Metadata knows, and what the customization UI represents.  The fix?  Simply increase your target attribute to the length identified by the Metadata.
The mind-trip?  Before you create the mapping, change the target attribute back to the original value that you first believed was right.  It works.  The secret?  Occam's Razor gives us the best answer:  it's magic.




for details discussion visit the link below

http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/deaa3d55-3e04-4411-8450-80d35e03eb9b

Internet Facing Deployment Access

Most of your questions are convered in the CRM Implementation Guide and the IFD Deployment Guide.

1. Correct: all users have to have a CRM user record to access CRM, regardless of whether you use on-premise or IFD configuraiton.
2. No: if you are using IFD configuration, then users can access CRM from any domain.
3. CRM doesn't integrate directly with Microsoft Exchange. Users can use CRM for Outlook which will process their email through Outlook, or you can configure the CRM E-mail Router to process mail on any email server

When a user visits the CRM URL they will be presented with a login form. They will need to enter their username and password, but they don't need to enter the name of the domain.
Like I said, there is no direct integration between Exchange and CRM. There is an option to use the CRM E-mail Router to connect an Exchange Server to CRM, but this is not a mandatory requirement. It all depends whether you need/want email processing or not, and whether the Exchange Server administrator wants you to connect the CRM E-mail Router to the Exchange Server or not.

Yes, when all users must have a CRM user record. And all CRM users must have an Active Directory user account. So therefore all users must have a CRM user record and an Active Directory user account.
Regarding Lotus Notes, the CRM E-mail Router can collect email from any POP3 mailbox and can deliver messages via an SMTP server. That's the theory. So if your dealer's Lotus Notes server is configured to allow the CRM E-mail Router to connect to the users' mailboxes via POP3 and you can access any SMTP server then you should be able to integrate with CRM to send and receive emails.
However, in practice, Lotus Notes is difficult to work with, Notes administrators don't want third-party services anywhere near the Domino server and there is very little help available -- so it will be a difficult job.




Please visit following link for full discussion

http://social.microsoft.com/Forums/en-US/crmdeployment/thread/aa361cbb-6e1d-4e1a-aa19-503e6b6fa98d