Skip to main content
Microsoft Dynamics GP forum
Unanswered

What would eConnect do if importing edits to an order with a user is on that order in GP?

editSubscribe (0) ShareShare
ReportReport
Posted on by 75,730

I have an import that uses eConnect to import changes to an order. In the past 6 months we have had a couple of instances where the task running this scheduled import timeouts and quits. I am wondering if what is happening is that a user is in GP editing an order that is in the import file. What would eConnect do? Would it continue on with the other imports or would it sit and wait for the user to exit the order? Is there any way to check for this situation?

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: What would eConnect do if importing edits to an order with a user is on that order in GP?

    Hi,

    Locks are not logged, they are very ephemeral in nature.

    I included DYNAMICS.dbo.taDEXLOCKS for information, it is what is used internally by eConnect to lock objects, not something you need to get into yourself, but interesting for those that want to know what is going on "under the cover".

    Tim.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: What would eConnect do if importing edits to an order with a user is on that order in GP?

    Tim, is there any way to see historical locks? The import runs at 9:15am each morning. This has only happened twice since the beginning of the year. Is there any documentation on the use of DYNAMICS.dbo.taDEXLOCKS? I do not see it in the eConnect node list.

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: What would eConnect do if importing edits to an order with a user is on that order in GP?

    Timeouts can happen for so many reasons, its just the nature of SQL database in production environment with many users doing all kinds of stuff.

    If you have an import using eConnect, then it is up to you as the developer how to handle errors arising from eConnect requests. 

    Where I'm using eConnect, I code it to retry like 30secs/1min after a timeout, then have a time squared back off rule, where I try less and less often to get the transaction to submit, then raise error after a threshold number of re-tries or time trying. If the SQL server has locked up, you really don't want to be adding more stress with your transactions, hence the backing off.  

    If the order is locked because a user is in that record (concurrency issues), econnect will see the lock record in tempdb..DEX_LOCK and then raise an econnect error 2079 Document is currently being edited by another user. That is different to timeout.

    Note that econnect will also lock the order using DYNAMICS.dbo.taDEXLOCKS procedure, so no one else can edit while eConnect is editing, its a good responsible database citizen.

    If you are seeing a lot of time outs it might be worth getting into a SQL server health check project. Set some extended event session in SQL to monitor for session time outs and another for deadlocks. Do the normal checking indexes are healthy and SQL stats up to date etc etc. 

    Tim 

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,068 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,591 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans