The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

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 by

Hi

When a user confirms his Assignment, i get M_Files server as a last modified by user.

I have tried setting SetModifiedBy through vb code - it is set as the last executing code in the event handlers

' Create a typed value for the "last modified by" value.
Dim objLastModifiedByTypedValue
Set objLastModifiedByTypedValue = CreateObject("MFilesAPI.TypedValue")
objLastModifiedByTypedValue.SetValue MFDatatypeLookup, CurrentUserID

' Update the last modification info.
Vault.ObjectPropertyOperations.SetLastModificationInfoAdmin ObjVer, True, objLastModifiedByTypedValue, False, Nothing

But still no luck.

Is there some way to make this work?

I need this information, because i'm building a history report out of it.

Thank you

Parents
  • Hi Zeljko,

    I don't use separate assignments much so I tested this out here.  I created a separate assignment for myself then marked it as complete.  In the history the server creates the assignment, but it's me who is marked as the user who marked it complete:

    I would double-check any code you have running which could be interacting with the object as it's saved.  Maybe disable all applications and event handlers and run your test to see what happens.

    If you feel that this is still misbehaving - and I am running a newer build than you, so it could be some fixed issue that I'm unaware of - then please do raise a support query.

    Regards,

    Craig.

Reply
  • Hi Zeljko,

    I don't use separate assignments much so I tested this out here.  I created a separate assignment for myself then marked it as complete.  In the history the server creates the assignment, but it's me who is marked as the user who marked it complete:

    I would double-check any code you have running which could be interacting with the object as it's saved.  Maybe disable all applications and event handlers and run your test to see what happens.

    If you feel that this is still misbehaving - and I am running a newer build than you, so it could be some fixed issue that I'm unaware of - then please do raise a support query.

    Regards,

    Craig.

Children
No Data