cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Property of type d:noderef

alfsender
Champ in-the-making
Champ in-the-making
Hi All,

I have created a custom content model. in my custom type i have property which is of type "d:noderef" where i will be storing noderef of another content. I know we can go with association/aspect to add this property. But consider this as special scenario.

I have set create new version on property update. So when i try to update this property and try to set it null, it creates new version but property value is not set with null in new version. It takes same nodeRef value from previous version.
i am trying to set this property through java-script based web-script.

Please send me you valuable feedback.

Thank you.
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Depending upon which API you are calling it may be using "null" to mean "don't change the value".   There will probably be an alternative method that you can use to remove a value.

alfsender
Champ in-the-making
Champ in-the-making
Thank you for your reply.

I am trying to set this property through javascript based webscript. So i am doing it

node.properties['st:attachedNodeReference']=null;

I also tried
node.properties['st:attachedNodeReference']="null";
node.properties['st:attachedNodeReference']="";
node.properties['st:attachedNodeReference']='';

But still not able to make it work.

Thank you.

rjohnson
Star Contributor
Star Contributor
You might try undefined (no quotes).