CreateLock

When users create a document from a form that generate sequence numbers, they hit a button that activate the agent that generate the numbers,The sequence numbers are generated based on teams, each Team must have its own numbers in a sequential way, (therefore cannot use Profile doc as I my teams keeps on Increasing and would require a Design change everytime a team is introduced).

Problem. When the Users the save button at the same time, the agent creates duplicates, meaning failing to synchronise the generation of numbers. How can I tell the agent to wait if the script is busy run by another user and release the lock if the user is finished running the script. Please help.

Subject: CreateLock

Hi!You will have to make a doc for each department containing the biggest sequence generated till now.Now when creation of new doc of a deptt lock the deppt unique doc and then find the sequence number to be generated and then unlock that document.This might solve your problem.

Thus you will be using locking concept >Hope you understand.

Manu