You are viewing limited content. For full access, please sign in.

Question

Question

Set the CreatedBy in SDK or Workflow

asked on December 26, 2019

Is there a way to set the CreatedBy field either using the SDK or Workflow?  I would prefer to do it via SDK but will accept Workflow if there is  no way to do it via the SDK.

I need this because we have an external application that is calling a web service.  The web service uses the Laserfiche SDK to insert documents into Laserfiche  This web service is running  in IIS and the IIS AppPool is running under a specific user.  When creating documents this is the user that is getting stamped in the CreatedBy field.  We do not want this to be the user, we want the user to be the one logged into the external application.  I have control over the payload of the external application so I thought what I could do is pass down the User ID of the user logged into the external application and then set the CreatedBy to that value.  When I try to set it using...

 documentInfo.Creator = serviceParameters.UserId;

...the compiler tells me I can't do this because Creator is read only.

Thoughts?

0 0

Replies

replied on December 26, 2019

The server stores the account that was used to create the document, and it is not modifiable. The only way to have a particular user's name there is to log in as them.

0 0
replied on December 27, 2019

How have other companies solved this problem?  We can't be the first company to insert documents through the SDK, not knowing the password of the originating user.

0 0
replied on December 27, 2019

I put an additional field on the template and store the created by there, as a workaround.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.