I wanted to send the document url via mail text on share javascript.
i) I've tried
mail.parameters.text = document.properties.url;
and
mail.parameters.text = document.properties.shareUrl;
both returns null.
ii) I tried copying the whole address based on folder name, such as
mail.parameters.text = companyhome.childByNamePath("Sites/test-script/documentLibrary/test.txt");
this returns server error..
iii) And when I tried
mail.parameters.text = document.url;
I get
/d/d/workspace/SpacesStore/7158a48b-4150-40d1-a65e-1a1c7f42ef5d/T%20-%20Copy%20(10).txt
but I cannot simply use this url.
I feel like I'm almost there, please tell me what I'm missing.
Thanks in advance!