SBM ModScript Reference → Programming SBM ModScript → Object Types → VarRecord → VarRecord StartTransitionWithLock() Method
(SBM On-Premise/PaaS only) Identical to StartTransition(), assumes AppRecord.Lock() has been invoked.
Parameter | Type | Description |
---|---|---|
trans | Variant |
Can be transition ID, 0 (will use default Update transition for item), transition UUID, or transition internal name. |
stealLock | bool |
Optional. If true, any item lock on this item will be stolen by this transition. If it was locked, the user who had the item locked (in transition) will not be able to complete their transition. Does not guarantee that the transition succeeds, as scripts can steal locks from each other. |
Type | Description |
---|---|
bool | True if transition was started. If false, use Shell.GetLastErrorMessage() for more information. |
SBM ModScript version: 11.3.
var varRecord = Ext.CreateVarRecord( tableId ); var read = varRecord.Read( itemTitle ); var gotLock = varRecord.Lock( true ); if ( !varRecord.StartTransitionWithLock( transId )){ // write an error to Active Diagnostics ADLog.Message( __FILE__, __LINE__, ADLogLevelConstants.ERROR, "StartTransitionWithLock failed:\n" + Shell.GetLastErrorMessage() ); ExitScript(); }
Use FinishTransition() to complete the transition.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.