Redirect to edit-metada page after successful uploading

cancel
Showing results for 
Search instead for 
Did you mean: 
anuradha1
Active Member II

Redirect to edit-metada page after successful uploading

I am using alfresco 5.2 community version & i need a way to automatically redirect to the edit-metadata page after a successful uploading. I wrote a script for that but it gives me an error.

var nodeRefURL = "edit-metadata?nodeRef=" + response.nodeRef;
Alfresco.util.navigateTo(nodeRefURL);

Please help me to correct above script.

Thank you.

9 Replies
cesarista
Customer

Re: Redirect to edit-metada page after successful uploading

anuradha1
Active Member II

Re: Redirect to edit-metada page after successful uploading

thank you for the quick reply. I tried this one by deploying both surf & repo amps into 'amp' & 'amp share' folders. But nothing changed. Why is that?

cesarista
Customer

Re: Redirect to edit-metada page after successful uploading

anuradha1
Active Member II

Re: Redirect to edit-metada page after successful uploading

Thank you Cesar, but it only allow for add several types. But i have aspects to add also. How can i achieve that?

anuradha1
Active Member II

Re: Redirect to edit-metada page after successful uploading

That's really helpful but it is not my requirement. Actually, i need a script to do this manually. So i can run that script using a rule.

anuradha1
Active Member II

Re: Redirect to edit-metada page after successful uploading

is there no way to do this using java script? I need to write a script for this and run it using a rule. Please help me.

anuradha1
Active Member II

Re: Redirect to edit-metada page after successful uploading

I created another script like below

var node1 = userhome.childByNamePath('findNode1.txt');
var nodeRefURL = "http://10.8.8.34:9090/share/page/context/shared/edit-metadata?nodeRef=" + node1.nodeRef;
logger.log(nodeRefURL);
window.location.replace(nodeRefURL);

It gives me following error.

500 Internal Error An error inside the HTTP server which prevented it from fulfilling the request. 07160063 Wrapped Exception (with status template): 07160132 Failed to execute script 'Javascript Console Script': 07160131 ReferenceError: "window" is not defined. (Javascript Console Script#4)

Please help me to solve this.

douglascrp
Advanced II

Re: Redirect to edit-metada page after successful uploading

You are mixing server side with client side code, so that is the reason it is failing.

There is no way to achieve that by using folder rules.

In order to change that behaviour, you will have to customise Share, the user interface.

Start your research by reading this Document Library | Alfresco Documentation 

anuradha1
Active Member II

Re: Redirect to edit-metada page after successful uploading

Thank you Douglas, I read that document roughly, but now i don't have much time to go through in detail. Can you please tell me a way to redirect to the edit-metadata full page after a successful upload. Also, need to know whether i can do this on a specific upload or not. (Because i don't need this each and every upload. That's why i tried to do it using a rule)

Thank you.