RestAPI : Set the CreatedBy

Is there any equivalent of the SetCreationInfoAdmin method in the Rest API ?

M-Files API - SetCreationInfoAdmin Method (m-files.com)

I've tried setting the Property 25 but the value never changed.

We are planning to create document from an external application using a custom application user but need to associate the document to an actual M-Files user.

Parents
  • No, there isn't something similar unfortunately.  I think your best solution would be to use something like a Vault Extension Method, or event handler or similar, to ensure that this reflects the correct person.

    I would also just slightly highlight that the use of SetCreationInfoAdmin (and also the method that sets the last-modified) should be used carefully. If abused then it can make it hard to understand who actually did what, or even potentially be a consistency concern from an auditing perspective.

  • I have tried the vault extension but using SetCreationInfoAdmin in an extension always give me the error "The object is checked out to another user."

    I am using a VAF extension. The currentUserId is OK and set to the user who perform the check-out.
    I don't understand why it doesn't work.

    The same code inside MFEventHandlerBeforeCreateNewObjectFinalize works.

Reply
  • I have tried the vault extension but using SetCreationInfoAdmin in an extension always give me the error "The object is checked out to another user."

    I am using a VAF extension. The currentUserId is OK and set to the user who perform the check-out.
    I don't understand why it doesn't work.

    The same code inside MFEventHandlerBeforeCreateNewObjectFinalize works.

Children
No Data