Take the 2-minute tour ×

How can I change 'creator' property in webscript in Alfresco of uploaded document?

I am using Alfresco 4.2, btw.

Best, D

share|improve this question
Javascript or Java webscript ? –  Magus Jan 16 '13 at 13:02
I am using Javascript. –  Deveti Putnik Jan 16 '13 at 14:23

3 Answers 3

up vote 1 down vote accepted

If I'm not wrong cm:creator, cm:modifier, cm:created, cm:modified, etc...are auditable properties in Alfresco it means, can't be updated manually because are managed by Alfresco.

I have developed a java backed webscript and I have added this code (to update the creator and modifier properties) that is working properly:

// Disable auditable aspect to allow change properties of cm:auditable aspect
policyBehaviourFilter.disableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);

// Update properties of cm:auditable aspect
nodeService.setProperty(nodeRef, ContentModel.PROP_CREATOR, "xxxxxx");
nodeService.setProperty(nodeRef, ContentModel.PROP_MODIFIER, "xxxxxx");

// Enable auditable aspect
policyBehaviourFilter.enableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);

Don't forget to add in your context.xml file where you declare your beans:

<bean id="xxxxxxxx" 
      class="your class package"
  <property name="nodeService" ref="NodeService" />
      <property name="policyBehaviourFilter" ref="policyBehaviourFilter" />     

Good luck

share|improve this answer
Your answer should contain the actual answer, not a link to the answer. If the blog goes down in the future, your 'answer' would be lost! –  Manuel Nov 7 '13 at 12:05

The "cm:creator" is a controlled audited property that cannot be changed directly. Much like "cm:modifier" which is updated by the system when a user authority modifies the content/properties (content is just a special property really) of the document node.

You can change the owner of a document via the Repository APIs. This is a permissions change though and will still not change the cm:creator property (and it shouldn't).

share|improve this answer

You can take a look at this forum post.

Like stated, after the field is set it can't be changed any more. You could or change the contentModel.xml to set the cm:creator field to default (which is read and write).

Or you could copy the document on the moment and set the FullyAuthenticatedUser for a short time and revert it afterwards. You will need to write some Java Code for it (e.g. in a Java Action).

share|improve this answer

Your Answer


