Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

GP Webservice - UpdateSalesInvoice error - A transaction exception has been thrown.

Posted on by Microsoft Employee

Hi,

    We're using GP web service to update our Sale Invoices using the operation UpdateSalesInvoice operation. This only happens when we're pushing 4000 invoice lines, after 40 minutes of processing the GP web service returns the error "A transaction exception has been thrown.  Please attempt operation again."

When I check the Web Service Exceptions Console. The exception message is "The transaction has aborted" and below is the stack trace output.

at System.Transactions.TransactionStateAborted.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)

at System.Transactions.CommittableTransaction.Commit()

at System.Transactions.TransactionScope.InternalDispose()

at System.Transactions.TransactionScope.Dispose()

at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)

at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateEntity(String connectionString, String sXML)

at Microsoft.Dynamics.GP.EConnectAdapter.ExecuteWrite(String xml, String typeName, Context context, BusinessEvent eventType, BusinessObjectEventArgs args, EventLocation eventLocation)

at Microsoft.Dynamics.GP.EConnectAdapter.Update(BusinessObject businessObject, BusinessObject originalBusinessObject, Context context, Policy policy)

at Microsoft.Dynamics.GP.GreatPlainsBusinessService.PersistForUpdate(BusinessObject businessObject, BusinessObject originalBusinessObject, Context context, Policy policy)

at Microsoft.Dynamics.Common.BusinessService.Update(BusinessObject businessObject, Context context, Policy policy)

*This post is locked for comments

  • Suggested answer
    Redbeard Profile Picture
    Redbeard 12,931 on at
    RE: GP Webservice - UpdateSalesInvoice error - A transaction exception has been thrown.

    In answer to your first question, here is a stackoverflow post on increasing the time out on client and server side, which may allow you to process all of the records in one pass.

    stackoverflow.com/.../how-to-increase-the-timeout-to-a-web-service-request

  • Suggested answer
    Redbeard Profile Picture
    Redbeard 12,931 on at
    RE: GP Webservice - UpdateSalesInvoice error - A transaction exception has been thrown.

    I would recommend spinning up a test environment with the eConnect 2010 SP2 to run a practical test to validate it resolves your issue. You may even try contacting eOne to see if they can validate it for you.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP Webservice - UpdateSalesInvoice error - A transaction exception has been thrown.

    Hi Harry,  thanks for the info. This helps but our main goal is to be able to send a big transaction without breaking it into smaller transactions. Is there any other suggestion to fix the timeout issue? I saw a posting that says Econnect 2010 SP 2 will resolve this issue but we haven't tried.

  • Suggested answer
    Redbeard Profile Picture
    Redbeard 12,931 on at
    RE: GP Webservice - UpdateSalesInvoice error - A transaction exception has been thrown.

    I saw your post and was instantly reminded about a recent post which involved eConnect and multi-threading. I couldn't find the post, but did find the following post, which covers multi-threading and web services in Dynamics GP.

    community.dynamics.com/.../136039

    Perhaps this can help speed your integration and resolve your problem.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans