Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Duplicate record while running a plugin

$
0
0

Hi,

I have a plugin which executes on saving of a record of a custom entity. Problem is, when multiple users tries to create record, its assigning same number to the clients. I tried locking the create method with following code 

m.WaitOne();
try
{

//Logic for plugin

}
finally
{
 m.ReleaseMutex();
}

The problem with this is, when multiple requests are made, for some of them it throws SQL timeout exception.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images