Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Microsoft Dynamics 365 Online- Plugin Lock statement not working

Posted on by Microsoft Employee

Hello All,

I was working on plugin for dynamics 365 online system with lock statement.

We are trying to update the seat availability on the basis of booking and bookings are created in bulk.

So what should happen is it should check how many booking records are created and update them in seat availability text field.

When we try it for single booking record it works fine but when booking records are created in bulk it just mess up the counting.

We had applied the same approach on the On-premise system and it works fine but it looks like lock is not working in any online systems.

So, Can anyone suggest me a way how to implement lock which should work in the online system?

The current lock implement is like-

 private static readonly object readWriteLock = new object();

lock (readWriteLock)
{ Logic }

This working on On-Premise systems but not in Online system.

*This post is locked for comments

  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Microsoft Dynamics 365 Online- Plugin Lock statement not working

    I believe this happened because when on premise. You only have single server. When running in online, you don't know how many backend that will be used. If you really want to make sure the data is correct, then you can try to implement update concurrency.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans