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}"
Solved! Go to Solution.
If you would like to bypass an authentication from share you can use the proxy authentication URL.Using below url you can call any webscript from alfresco share and it will by pass the authentication..
http://localhost:8080/share/proxy +"alfresco webscript URL"
If you would like to bypass an authentication from share you can use the proxy authentication URL.Using below url you can call any webscript from alfresco share and it will by pass the authentication..
http://localhost:8080/share/proxy +"alfresco webscript URL"
Unfortunately, this method is not working for me. I tried the following link:
http://localhost:8080/share/proxy/sts/report...
Anything I put after .../share/proxy/ gives me "Invalid EndPoint Id:" error
I want to mention I am using an all-in-one alfresco maven sdk project and I defined my webscript in the platform/repo module.
It should be
http://localhost:8080/share/proxy/alfresco/sts/..................
Yes, that was it!
Thank you!
So that how is your final action looks like? I am trying to do the same thing but I need to add a custom property value in the href any idea?
Something like this
<param name="href">www.google.com/{customModel:CustomProperty}</param>
<param name="target">_blank</param>
You can use , [jsNode.properties.customModel_CustomProperty]..
Refer share-documentlibrary-config.xml for more details.
<action id="alfresco.tutorials.doclib.action.goToGoogle1" icon="google" type="link" label="alfresco.tutorials.doclib.action.goToGoogle.label">
<param name="href">http://www.google.com/[jsNode.properties.dpl_sa]</param>
<param name="target">_blank</param>
</action>
model prefix: dpl
property prefix/name: sa
By the way the model has been created by the share UI
I mean {sNode.properties.customModel_CustomProperty}.....sorry for wrong bracket
sNode or jsNode xD? where can I find a document about this systax?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.