Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Unanswered

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

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

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans