locked
SDK (early bound classes) - writes taking several minutes to commit RRS feed

  • Question

  • Hi,

    I'm developing an integration to Dynamics 2011 with the early bound classes that's
    running quite well, however sometimes we're seeing significant delays in the
    actual creation and updates to entities - they (in extreme cases) can take
    several minutes.

    I'd like to stress that the actual web API calls are fast (sub second) and this is
    only on the writes.

    Where this is an issue is when we're creating or updating entities that are required for
    another entity (i.e. we go to create a child entity / dependent entity but the
    parent entity hasn't been 
    committed yet).

    I only have limited access to the system itself, however I know there are many workflows
    and plugins running on the servers (that are not mine to change or edit).

    So where and how should I start looking for the problem? Is there any way to “flush” changes
    to the database? I don’t want to run off looking for issues in the SQL back end
    when the problem may be higher up…

    Again, the actual web service calls return quickly – the delays we see when attempting to
    access those entities later (and can also be seen when looking at the audit
    histories of the records).

    Thanks,

    Scott


    Scott Quinn | C# developer & messaging specialist (for hire). Contact me at http://au.linkedin.com/in/scottquinn


    • Edited by Scott Quinn Monday, August 3, 2015 4:34 AM format
    Monday, August 3, 2015 4:34 AM

All replies

  • Are the web service calls you make synchronous or asynchronous ? If the call is synchronous, then any web service call to create or update a record will only return when the platform operation (i.e. the create or update, and any associated data operations in synchronous plugins) has completed. So, making sure you make synchronous calls would seem the simplest solution. Unfortunately I don't do much with the early bound classes, so I don't know if or how this can be controlled

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, August 4, 2015 7:15 AM
    Moderator
  • All the web service calls (early and late bound) are synchronous.


    Scott Quinn | C# developer & messaging specialist (for hire). Contact me at http://au.linkedin.com/in/scottquinn

    Tuesday, August 4, 2015 8:06 AM
  • Hello Scott, you also need to ensure that the plugins and the workflows triggered by the web service call are registered synchronously.
    Tuesday, August 4, 2015 3:43 PM
  • If all web service calls are synchronous and all respond within a second, then where are you seeing the significant delay ?

    The overall process to create a record is:

    Submit sync web service call to create a record
     Pre-event plugins run 
     Crm creates the record
     Synchronous post-event plugins run
    Receive response to web service call (which includes the Guid of the newly created record)


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, August 4, 2015 7:14 PM
    Moderator