I have an application that syncs a document library on Sharepoint with KL using eConnect. Basically on a person approving a document, a work flow gets kicked of, and the workflow sends the invoice to GP2013. Seemingly randomly we are getting this error[1] when eConnectMethods.CreateTransactionEntity is called. After that when eConnectMethods.Dispose is called another error is thrown[2].
The frustrating thing about this error is if we rerun the workflow, it works no problems. Same code and same xml and the error seems to not follow any patterns.
[1]
CreateTransactionEntity eConnectException: Microsoft.Dynamics.GP.eConnect.eConnectException: Sequence contains no elements
at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateTransactionEntity(String connectionString, String xml)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateTransactionEntity(String connec tionString, String sXML)
at Mysolution.namespace.SendToGreatPlains.submit(eConnectType eConnType, String dbConn, String& errorMessage)
[2]
System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelFactory.OnClose(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelFactory.TypedServiceChannelFactory`1.OnClose(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
at System.ServiceModel.ChannelFactory.OnClose(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
at Microsoft.Dynamics.GP.eConnect.ServiceProxy.Dispose()
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.Dispose()
at Mysolution.namespace.SendToGreatPlains.submit(eConnectTyp e eConnType, String dbConn, String& errorMessage)
I've tried this article's suggestion:
http://support.microsoft.com/kb/2539263
I've also tried many changes in the code.
These are on on good hardware and the network between them is solid.
Any suggestions? Do you need more information?
*This post is locked for comments
Sequence Contains no elements means that you are missing required fields.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156