cancel
Showing results for 
Search instead for 
Did you mean: 

Extending Create-site.js

mduduzi
Confirmed Champ
Confirmed Champ
Hi,

We have a requirement to redirect to a webscript on successful site creation which we have done and is working. The problem is   the url calling the webscript is machine/server dependent

    eg document.location.href = http://<server>:<port>/alfresco/service/<my webscript>

What we want is something like

    document.location.href = Alfresco.constants.<something> + "/service/<my webscript>" where
           Alfresco.constants.<something> returns  http://<server>:<port>/alfresco

I am not sure if I am making sense.

Kind regards
2 REPLIES 2

niketapatel
Star Contributor
Star Contributor
Hi If I understand correctly you are redirecting to some alfresco webscript on creation of site.

Below constant is available in Share client side js,
To call any alfresco data webscript, Please use

Alfresco.constants.PROXY_URI which refers window.location.protocol + "//" + window.location.host + "/share/proxy/alfresco/";
Ex: Alfresco.constants.PROXY_URI + "api/node/" + nodeRef + "/formprocessor" [Your custom or OOB script URL]

Hope it helps!

Thanks. I will test it later today.