DESCRIPTION
This VBScript sample code demonstrates how to issue an approval-aware modify operation.
SCRIPT
'----- bind to AD object -----
Set objUsr = GetObject("EDMS://CN=John Smith,OU=Sales,DC=foocompany,DC=com")
objUsr.Put "description", "senior manager"
'----- set the control AllowApproval to check if an approval is required -----
objUsr.Control ("AllowApproval", true) = "Check"
objUsr.SetInfo
'----- verify if this operation requires an approval -----
If "Pending" = objUsr.Control ("OperationStatus") Then
'----- operation was not completed. it requires an approval -----
'----- set the control AllowApproval to send the operation for approval -----
objUsr.Control ("AllowApproval", true) = "Confirm"
objUsr.SetInfo
End If