cancel
Showing results for 
Search instead for 
Did you mean: 

How to change ownership while document is uploaded

tallraj
Champ on-the-rise
Champ on-the-rise

We need to change the ownership of the document when it get's uploaded into a folder, as it goes through a workflow where on approval, it is moved to a different folder in which the uploader has only consumer rights. Currently the documents are allowed to be deleted as the uploader is still the owner of the document. How do we prevent this from happening?

1 ACCEPTED ANSWER

kalpesh_c2
Star Collaborator
Star Collaborator

Hi,

In order to change the owner of a document you just need to create a script having below given code

document.setOwner("NewOwnerId");
document.save();‍‍‍‍

You can execute this script by creating rule on a folder


Let me know if you have any further query with this.

Thanks,
Kalpesh

ContCentric

View answer in original post

4 REPLIES 4

kalpesh_c2
Star Collaborator
Star Collaborator

Hi,

In order to change the owner of a document you just need to create a script having below given code

document.setOwner("NewOwnerId");
document.save();‍‍‍‍

You can execute this script by creating rule on a folder


Let me know if you have any further query with this.

Thanks,
Kalpesh

ContCentric

Hi,

Thank you - will check this and revert back

Rajagopal G

Software Consultant

Worked for us - thank you very much

smayuri
Champ in-the-making
Champ in-the-making

Hello Sir,

I wanted to Prevent Creators of Documents from Deleting Their Own Document. Can you please elaborate your answer? It will be helpful for me. Thanks in advance.

-Mayuri