Hi,
I am starting investigating use of plumsail form in sharepoint environment.
On saving a form, I need to get the current site url to send it as parameter to a web service.
Can someone help me getting this url without I loose time to search for the information ?
Thanks.
Regard.
Eric.
Hello @educos35,
Welcome to Plumsail Community!
You can use this code to get the site URL:
// get the site URL
var siteUrl = _spPageContextInfo.siteAbsoluteUrl;
Thanks,
I just replaced siteAbsoluteUrl by webAbsoluteUrl, because I wanted the url of the current subsite, not the url of the site collection.
Regards.
Eric.
1 Like