cancel
Showing results for 
Search instead for 
Did you mean: 

After editing properties of a document, edit another document

wns
Confirmed Champ
Confirmed Champ
Hello,

The situation is…I'm editing the properties of a document "Test.docx" using the action "Edit properties" in Share. It opens the pop-up with the fields that I want to edit. After my editing I want to edit also another file (Test.pdf) that it's referenced (cm:references - apect) to the current document that I already edited.
It has to be a background process when I click on the save button.

Firstly, I tried to edit the file "metadata.post.json.js" located in "/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/metadata/". I think that this is the file that saves the new properties after the editing. I'm not sure if this is the file because my applied changes didn't work. It was my attempt to resolve it on the repository side.

After that, I tried to resolve it editing a file of the Clien-Side part. The file calls "action.js" placed in "alfresco\components\documentlibrary\". It exists a function called "onActionDetails". If I debug this function I can get the properties of the document that I'm editing (Test.docx) but I can't obtain the referenced document "Test.pdf".

Do you know how can I get the referenced document "Test.pdf" in the file "action.js" using Share Client-side API?

After clicking the save button, where can I find the file that receives the edited properties? I thought that this file was "metadata.post.json.js".

I think I have two posibilities modifing code, what do you think?

Thank you very much

Kind regards

1 REPLY 1

wns
Confirmed Champ
Confirmed Champ
Hi all,

I resolved it adding an Ajax request into the JS "action.js" that is located in the Client Side (Share). After that I added a WebScript (it's calle from my created Ajax request) in the Repository Side (Alfresco) to manage the incoming properties.

That's all

Thanks.