|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > Revision > OnBeforeCheckin.LST script file |
It is executed before the execution of the Checkout→Checkin on a document.
Using this script it is possible to halt the checkin process.
Options→Revisions
@DOCUMENT_UNIQUE_ID |
uid of the doc to checkin |
|---|---|
@IS_LINKED_DOCUMENT |
the currently processed document is 0: the selected/active document; 1: a linked document; |
@OKCHECKIN |
Mandatory |
Differently from OnCheckin.LST, that's called only as a notification of the event, this script can interrupt the checkin process.
.VBSCRIPT
Sub Main
DBWInit(TRUE)
uid = DBWInput("@DOCUMENT_UNIQUE_ID")
res = DBWMsgBox2("Proceed with checkin of " & DBWQueryByUid(uid,DBWLookUp("NAME_FIELD_ID")),4 OR 32,"OnBeforeCheckin.LST")
If res=6 Then 'VbYes
DBWMsgBox2 "Proceed with checkin action",64,"OnBeforeCheckin.LST"
DBWOutput "@OKCHECKIN",1,ForWriting
Else
DBWMsgBox2 "Checkin action canceled",16,"OnBeforeCheckin.LST"
DBWOutput "@OKCHECKIN",0,ForWriting
End if
End Sub