Hi,I have an open for approval button on a database.
For various reasons (unexpected behaviour, other post on here), I don’t want to ‘enable document locking’ on the database.
However, I do want to take advantage of ‘soft locking’ feature.
This is currently providing useful functionality which prevents users editing the same document at the same time.
However, it also returns other errors. I would like it to just return the first error (document is already locked by…).
I cannot use @DocLock([STATUS])) as Lotus have introduced another one of those HANDY features, restricting it’s use to database’s where document locking is avaliable. (I don’t want too/can’t implement this).
Additionally, because I want to set an environment variable as the first line of the code, (it MUST be before the edit), I cannot use:
@If(@Command([EditDocument]);
@Do(stuff);
@Return(“”)
Can anyone suggest an alternative that doesn’t involve either enabling document locking for the database, or using the above suggestion.
Here is the actual code in the Open for Approval button:
FIELD OpenforApproval:=OpenforApproval;
@SetEnvironment(“OpenforApproval”;“Yes”);
@Command([EditDocument];“1”);
@Command([ViewRefreshFields]);
@Command([RefreshHideFormulas]);
@Command([RunAgent];“Refresh Document1”);
@If(MainProjectPhase=“Project Inception” & RACIupdate!=“Yes” & RACIStatus!=“Proposal”;
@Do(
@Command( [SectionExpand] );
@Command([FileSave]));
@Command([FileSave]))