Hoping someone can help with this.
I’m writing a little web app that needs a sequentially generated tracking number.
On the WebQueryOpen event, the form calls a background agent that, amoung other things, gets the next sequential number.
The function that gets the next number is simple. It gets a profile document, gets the current number, adds 1, saves the new number back to the profile document, then passes it to the context document.
So I wanted to make use of document locking to ensure that I don’t end up with duplicate numbers or save conflicts but, given the way document locking works, I can’t find a way to implement this.
Since…
(a) - I don’t want to give all web users access to the profile document (and other thinks), the background agent is not set to “run as web user”.
…and…
(b) - Document locking uses the effective user name when applying the lock.
…the method will return ‘True’ because the user name will always be in the ‘LockHolders’ property.
So my question is, can anyone think of a way to get this to work or suggest an alternative?
Thanks in advance
Ernest