You need to sign in to do that
Don't have an account?
Mikhail Rzhevsky
Get sf site url from community
Hello.
I have lightning component, working on community page and need to get reference to the main salesforce site for get link to download content form ContentVersion. Link must be like this
var documentId = "https://study-####--####.lightning.force.com/sfc/servlet.shepherd/document/download/";
I tried a lot of variants from URL class like getHost(), getPath(), getRef(), getSalesforceBaseUrl(), getCurrentRequestUrl().
But I can only get component's url from controller of community it is like this
https://conf-######.##70.force.comIf you have any ideas,please share it.