web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Microsoft Dynamics 365 Online- Plugin Lock statement not working

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    2,916 on at

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans