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 !