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

Last modified in Fully automated workflow?

In my case all transitions are automatic based on different criteria. Now in every case last modified is M-Files server. I have user that could be used stored in property.

fUser = CurrentUserID
Dim oCurrentUserTypedValue : Set oCurrentUserTypedValue = CreateObject( "MFilesAPI.TypedValue" )
oCurrentUserTypedValue.SetValue MFDataTypeLookup, fUser
Vault.ObjectPropertyOperations.SetLastModificationInfoAdmin ObjVer, True, oCurrentUserTypedValue, False, Nothing

-> M-Files Server

fUser = 1322

-> M-Files Server

I have to use code in every transition so that M-Files accepts it. If M-Files would allow "infinite loops" I would not need code and I probably would get right Last modified.

So how do I get that code to work or some other way?

PJ

Parents
  • Hi,

    Automatic state transitions based on filters, are evaluated by the server every hour (default) or when object/metadata is changed. If an object matches the filter it is automatically moved by the server and thus has "(M-Files Server)" as last modified. This is by design.

    Looping automatic state transitions will not change this behavior.

    If you want last modified by to be the user who last edited the object in the previous state, I believe you will have to get that userId from the previous version of the object. 

Reply
  • Hi,

    Automatic state transitions based on filters, are evaluated by the server every hour (default) or when object/metadata is changed. If an object matches the filter it is automatically moved by the server and thus has "(M-Files Server)" as last modified. This is by design.

    Looping automatic state transitions will not change this behavior.

    If you want last modified by to be the user who last edited the object in the previous state, I believe you will have to get that userId from the previous version of the object. 

Children
No Data