Asked by:
crm plugin issue when updating parent account field in account.

Question
-
Hi ,
In my CRM Application ( CRM 2011) we have accounts and contacts. when account parent account is updated their contacts owner id will be updated in crm db server and external server using notification service which is called by pulgin.
so in one of my account has 6000+ contacts ,when updating accounts parent account id from crm , screen disabled and after 4 to 6 mins sql error message screen displayed.
below is the eventviewer log ,
The Web Service plug-in failed in OrganizationId: 457b2390-e086-485f-9b05-
094f6410abef;
SdkMessageProcessingStepId: 63cdbb1b-ea3e-db11-86a7-000a3a5473e8; EntityName: account; Stage: 30;
MessageName: Update; 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.Threading.ThreadAbortException: Thread was being aborted.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo. UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
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) If i debug the account update code plugin it seems to be working fine (means updated parent account id and contacts ). if i remove debugger and hit on save from crm , throws error.
this is high priority issues , im struggling from past 3 days could get any solution.
if any one helps really appreciated.
- Edited by nunna veera Tuesday, January 20, 2015 6:23 PM
Tuesday, January 20, 2015 6:15 PM
All replies
-
First.
If you use plugin for send information to any external system you create small intergation.
For integration use must create async plugin. On your trace ( account; Stage: 30;) you use sync plugin.
Second
For increment CRM timeout add reg key OLEDBTimeout.
about this key you can read from microsoft support
good luck
Tuesday, January 20, 2015 10:07 PM -
This needs to be done by a Async Plugin definitely. Are you getting this error from ASYNC plugin?
If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com
Wednesday, January 21, 2015 9:12 AM -
Hi,
You can use trace, to write data to the log file. This can help you to find problem place in plugin without debugging.ITracingService trace = localContext.TracingService; ... //Write to the log file trace.Trace("Here i check Name of entity:" + MyEntity.LogicalName); if (MyEntity.LogicalName = "name") {...
This should help to find issues in our plugin.
Wednesday, January 21, 2015 9:29 AM -
Hi,
Thank you for your reply. actually i have turned my plugin to async and increase the oledbtimeout in regedit.
it worked for 3000 records , but it is failed for 5000+ records. we have 5000+ contacts under one account. that needs to be updated.
Please help me in this.
Thursday, January 22, 2015 1:51 AM -
Hi Hari,
i have tried with changing plugin as async , but it is worked for 3000 records. not more than that.
actually my plugin calling notificationservice , which is inernally communicating external server to check some condition for related account contacts they are more 5000+.
can you please help me out this.
Thursday, January 22, 2015 1:56 AM -
i have trace file , it logged so generic error which is not understood.
please suggest me if there is any alternate solution
Thursday, January 22, 2015 1:57 AM -
Hi,
May be you should avoid to do this task in plugin? May be you should write your service, which will update records, and plugin or javascript will call your service with needed parameters.
For example SSIS can do this task.
Thursday, January 22, 2015 6:41 AM -
May be you can create a batch job (console Application) which does the exact job and runs every hour or so. Since within CRM it is going to increase Load on the async servers as each update depends on an external server call!
If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com
Thursday, January 22, 2015 2:41 PM