web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

eConnect.eConnectException: Sequence contains no elements

(0) ShareShare
ReportReport
Posted on by 10

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

I have the same question (0)
  • Verified answer
    mike024 Profile Picture
    10 on at

    Sequence Contains no elements means that you are missing required fields.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
HP-11021721-0 Profile Picture

HP-11021721-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans