Hello,
We have integrated CRM and D365FO for one of our clients. Integration of data is done through batch classes using CRM DLL. Projects are created in D365FO through data received from CRM. Sometimes batch job ends in error due to some reason and in log it shows below error.
Infolog for task Project Integration System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity) at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity) at Integration.IntgrBase.UpsertMonitorLogs(IOrganizationService crmService, String MethodName, String entityName, Guid MonitorLogId, String preProcessingStageMessage, String postProcessingStageMessage, Boolean isInsert, Nullable`1 failCount, Nullable`1 successCount, String finalStatusSummary, String CRMkey) at Integration.PlanBatch.ProjectFetch(String CRMKey) at Dynamics.AX.Application
It seems error from CRM end but we are not able to find a reason behind same. Strange part is once error comes for particular batch job, it executes successfully next batch job. It is kind of some random error.
Please let me know if anyone has fixed this kind of issue. Can we handle error batch through some try and catch mechanism?
Regards,
Smit