Thursday, 7 November 2013

CRM 2013 demo builder

http://demobuilder.cloudapp.net

user must be either Microsoft Partner employee or Microsoft employee to use it.

Friday, 25 October 2013

Remote Debugging

Remote debugging is the one of the most challenging things to accomplish.

To remote debug.

1. Check visual studio version, to do this go to Help -> About mine is "Microsoft Visual Studio 2010 Ultimate".

2. Google for "Microsoft Visual Studio 2010 remote debugger download"

3. Download the 64 bit installer from the Microsoft website e.g.
http://www.microsoft.com/en-gb/download/details.aspx?id=475

4. The one I needed to download was 64 bit and called "rdbgsetup_x64.exe"

5. Install the installer on the server where the web service is running

6. On the start enter 'remote debugger' and then right click the 'Visual Studio Remote Debugging Monitor (x64) from the list of available options  and select to run under 'Run as Administrator'

7. In the remote debugger go to 'Tool -> Options' and select 'No Authentication (native only) and also check 'Allow any user to debug' then copy the name from Server name at top e.g. 'TempServerbox01:4015'

8. Disable Firewall on this server

9. Go to dev box and go to tool-> Attach to process option

10. select following value from the opened 'Attach to Process'
Transport: Remote (Nateive only with no authentication)
Qualifier: TempServerbox01:4015

click on refresh button and then select wp.exe/

11. Remote debugging is all set.

No if at the break point you are getting the message of "The breakpoint will not currently be hit", Then perform following steps.

1. Turn off firewall at dev box as well as at server where the webservice is deployed, as remote debugging process will try to send and receive request at both sides

2. Where remote debugger is running, change the  Authentication mode to  Windows Authentication, and copy the server name value e.g. abc\kaleemkhan@TempServerBox1

3. On the dev box open the attach to process window and enter following values
Transport: Default
Qualifier:  abc\kaleemkhan@TempServerBox1

4. Select any wp.exe present.

Remote debugging is all set now.

Disclaimer.

I take no responsibility of above mentioned instructions and any repercussions whatsoever as firewall should never be stopped and also remote debugger should be running under authentication which off course clearly I have not abide.

Thursday, 24 October 2013

This page cant be displayed


I was working on one crm org, and today when I tried to log back into system and tried accessing the page, I was getting following error screen.
 After spending bit of time. Following is the resolution I have applied.
Click on Setting icon and go to internet option

Go to 'Connections' tab and click on 'LAN settings' button

On the 'Local Area Network (LAN) Settings' make sure 'Automatically detect settings is checked and the option 'Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections)' should be un-checked.

Tuesday, 24 September 2013

On press of Find Available time on Schedule service activity CRM throws "An Unexpected error occurred." error

 
On press of Find Available time on Schedule service activity CRM throws "An Unexpected error occurred." error
 
In event viewer the following error message is shown
 
The Web Service plug-in failed in OrganizationId: xxxxx-xxxx-xxxx-xxxxxxxxxxx; SdkMessageProcessingStepId: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx; EntityName: none; Stage: 30; MessageName: Search; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
   at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.ArgumentException: Item has already been added. Key in dictionary: 'Plugin Friendly Name'  Key being added: 'Plugin Friendly Name'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at Microsoft.Crm.Scheduling.Engine.PluginTypeLibrary.LoadPlugins(SchedulingContext context)
   at Microsoft.Crm.Scheduling.Engine.PluginTypeLibrary.GetPluginType(String friendlyName, SchedulingContext context)
   at Microsoft.Crm.Scheduling.UserDefinedFunctionFactory.Create(IPluginTypeLibrary typeLibrary, String functionName, SchedulingContext context)
   at Microsoft.Crm.Scheduling.UdfExpression.Evaluate(SchedulingContext context, Object[] args)
   at Microsoft.Crm.Scheduling.Engine.ResourceSpecTree.EvaluateObjective(IExpression expression, IResource resource, DateTime proposalStartTime, TraceInfo traceInfo, AppointmentRequest request, Int32 leftOffset, Int32 rightOffset, SchedulingContext context)
   at Microsoft.Crm.Scheduling.Engine.ResourceSpecTree.ScoreTreeContext(NodeEntry bindEntry, TimeInterval interval, AppointmentRequest request, TraceInfo traceInfo, TimeZone userTimeZone, SchedulingContext context)
   at Microsoft.Crm.Scheduling.Engine.Strategy.Search(AppointmentRequest request, SchedulingContext schedulingContext)
   at Microsoft.Crm.Scheduling.Engine.StrategyBroker.Search(AppointmentRequest request, SchedulingContext context)
   at Microsoft.Crm.Scheduling.ScheduleSearchCommand.Execute(ISchedulingExecutionContext context)
   at Microsoft.Crm.ObjectModel.ScheduleService.Search(AppointmentRequest request, ExecutionContext context)
 
 
This is happening due to CRM is adding plugin name in some sort of dictionary and in the system it is finding plugins with the same Friendly name. The name of plugin is in  the following lines copied from above
 
Inner Exception: System.ArgumentException: Item has already been added. Key in dictionary: 'Plugin Friendly Name'  Key being added: 'Plugin Friendly Name'
 
Though the plugins are coming from totally different solutions and have there own namespace still due to we using crm developer toolkit the friendly name generated does not contains the complete name space and due to this there are duplicate friendly name exists in the system and somehow CRM scheduling engine is adding the plugin friendly names in dictionary and hence giving error.
 
Resolution is to update the plugin friendly name and make sure these are unique with in system they are going to be exported if not sure then make the friendly name include the name space of the project.

Thursday, 12 September 2013

sending CRM email with just the email address only

Entity toParty = new Entity("activityparty");
toParty["addressused"] =" khan.kaleemul@gmail.com"

Entity email = new Entity("email");
email["from"]=new Entity[]{ <<from party>>};

email["to"]= new Entity[]{toParty};
email["subject"]="email subject";
email["description"]="email body";
email["regardingobjectid"]=<<"regarding entity">>;

Guid emailId = crmService.Create(email);

SendEmailRequest reqSendEmail = new SendEmailRequest();
reqSendEamil = emailId;
reSendEmail.TrackingToken = string.empty;
reqSendEmail.IssueSend = true;

crmService.Execute(reqSendEmail);