Answered by:
Plug in step registration

Question
-
Hi Experts, Need u r help.My requirement is plugin will trigger when the task,appointment are create,assign,Close. As per SDk I registered the plugins steps as below Create -- Appointment,task Assign-- Appointment,task SetState,SetStateDynamicEntity for Appointment ,task(close). is this step registration are correct? Plugins registered Succesfully & not fired Suceesfully. even i am not getting any error & try to debug the plugin using attach process . no use. but in event viewer i saw the error like "A process serving application pool 'CRMAppPool' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '3928'. The data field contains the error number. " Can you help me to slove this asap
venkat- Moved by Donna EdwardsMVP Monday, July 13, 2009 7:19 PM (From:CRM)
Monday, July 13, 2009 4:28 PM
Answers
-
Hi,
Please try by running the plugin on Route event instead of Assign !!
Regards,
Nishant Rana
http://nishantrana.wordpress.com- Marked as answer by Venkatta Pidikiti Wednesday, July 15, 2009 8:09 PM
Tuesday, July 14, 2009 7:56 AM -
Hi venkat,
For all the activities you have to use 'Route' message rather than 'Assign'. Assign is for entities like lead,account and contact etc.,
Try with 'route'. sure it will work.
Regards,
GF- Marked as answer by Venkatta Pidikiti Wednesday, July 15, 2009 8:09 PM
Tuesday, July 14, 2009 8:35 AM
All replies
-
See if changing the InvocationSource, whether the plugin is executed in the parent or child pipeline helps. Also, try commenting your code and using just the line:
Throw new InvalidPluginExecutionException("plugin fired")
so that you can determine whether the error is in your code or in the registration. Don't forget to send the mode to 0 for synchronous execution.
Monday, July 13, 2009 10:24 PM -
Try to write your plug-in against the book and reschedule messages. Take a look at the following post. It might help you with your task.
http://mscrm4ever.blogspot.com/2009/06/summarizing-appointment-field-on-parent.html
Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/Monday, July 13, 2009 10:26 PM -
Thanks all for Support.Still the issue is not resloved.
Here is the i wrote to test the plugin
using
System;
using
System.Collections.Generic;
using
System.Text;
using
Microsoft.Crm.Sdk;
using
Microsoft.Crm.SdkTypeProxy;
using
System.Xml;
namespace
AssignAppointment
{
public class ApptAssignmentUser : IPlugin
{
#region
Plugin Context
public void Execute(IPluginExecutionContext context)
{
if (context.PrimaryEntityName == EntityName.appointment.ToString() && context.MessageName == MessageName.Assign)
{
throw new InvalidPluginExecutionException("plugin fired");
}
}
#endregion
}
}
& register the plug in with message Assign & primary entity =appointment && synchronous execution. & also register the post image.
still the plugin is not fired? any clues?
venkatTuesday, July 14, 2009 7:07 AM -
Hi, Is your plugin working in test environment. Do not use database to debug you plugin. put it on disc for registering it.Tuesday, July 14, 2009 7:42 AM
-
Hi,
Please try by running the plugin on Route event instead of Assign !!
Regards,
Nishant Rana
http://nishantrana.wordpress.com- Marked as answer by Venkatta Pidikiti Wednesday, July 15, 2009 8:09 PM
Tuesday, July 14, 2009 7:56 AM -
Hi venkat,
For all the activities you have to use 'Route' message rather than 'Assign'. Assign is for entities like lead,account and contact etc.,
Try with 'route'. sure it will work.
Regards,
GF- Marked as answer by Venkatta Pidikiti Wednesday, July 15, 2009 8:09 PM
Tuesday, July 14, 2009 8:35 AM