string WalkIn.OM.Orders.NewOrderNumber()
{
g = Global [ID != 0];
temp = g.Next_Order_Num;
g.Next_Order_Num = (g.Next_Order_Num + 1);
return temp.toString();
}
The problem is, when 2 orders are created within 3 seconds apart, they'd get the same order number. Is there anyway to guarantee atomicity for the function above?? What's the right way to implement something like this in Zoho?