This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VBScript in workflow cause the lost of the user name who is changing state

Former Member
Former Member
Hello all,

In some workflows, we have some scripts who change the date of a metadata when after changing workflow steps.
It is working correctly :

'--------------------------------
Function MsgBox(msg)
Err.Raise MFScriptCancel, msg
End Function
'--------------------------------

Const IPropDate = 1325 ' date passage etape 3

Dim oPropertyValue : Set oPropertyValue = CreateObject("MFilesAPI.PropertyValue")
oPropertyValue.PropertyDef = IPropDate

' sp?cifier la date seulement si elle ne l'est pas d?j?
If Len(PropertyValues.SearchForProperty(IPropDate).TypedValue.DisplayValue) = 0 then
oPropertyValue.TypedValue.SetValue MFDatatypeDate, DateSerial(Year(Now), Month(Now), Day(Now))
Vault.ObjectPropertyOperations.SetProperty ObjVer, oPropertyValue
end if


But when the script occur, it cause that the user who modified the document is replaced by "(M-Files Server)" so we are loosing the tracability of modifications.

Is there a way to avoid that ?

Thanks M-Files community !
Parents Reply Children
No Data