'**********************************************************
' avoidForwardingWhenReset	'added for CC-000784
' @author: A.Buellesbach
' @description: this function checks if a document exists but we are missing a document number. In this case user called the "Reset" function
'				if the reset function is used the document must be rejected (cancel draft)
' @param: 
' @return: nothing
'**********************************************************	
Function avoidForwardingWhenReset
	If wfvariables.iRejectDraft.Value = 0 Then
		If wfvariables.sDocumentNumber.value = "" And wfvariables.recStructure.iDocumentID.value > 0 Then
			sMsg = getMessageText ( "StandardWF", "HintWorkflowMaskReset", "Sie haben die Maske zurückgesetzt, daher darf nicht mehr weitergeleitet werden. Bitte ziehen Sie den Entwurf zurück.") 
			MsgBox sMsg, vbOKOnly + vbInformation, "enaio"
			scriptresult.ResultCode = -1
		End If
	End If	
End Function