AnsweredAssumed Answered

How to create action on document that opens page returned from webscript

Question asked by lex91 on Mar 22, 2018
Latest reply on Jun 12, 2018 by antonis

I know this must be something simple but I can't seem to find the solution.


I have a custom webscript which returns a html page accessible by going to a url like so:


The only argument the webscript needs is the nodeRef={nodeRef} argument.


What I want to do is create an entry in the Document Actions pane (available for every document) that will take me to the url with the nodeRef argument of the respective document. By document actions pane I mean this:


I'm guessing the solution lies with custom actions but I can't figure out how and where to define the action.

Btw, I used the alfresco maven sdk to create an all-in-one project. I plan to take the resulting amp files and install them into the production alfresco server.


Thank you!


// Edit


I managed to create an entry with an action of type:"link" and the following params:

<param name="href">/alfresco/s/sts/report?nodeRef={node.nodeRef}</param>
<param name="target">_blank</param>

The problem with this solution is it requires additional authentication for "/alfresco/s" (service). Is there a way to access my webscript from a share page so the user is already logged in?

For example: "localhost:8080/share/page/sts/report?nodeRef={node.nodeRef}"