function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
phillip kemp 4phillip kemp 4 

Automating share links

Hello,
Currently we are uploading a document to our opportunity. I need a way automate generating a public share link of a file and setting this to it's related opportunity url field. 

the idea is this will then be referenced later in a email template.

at the moment we have to:

1. upload the file

2. click on the file which navigates away from the opportunity

3. generate the share link

4. copy the link

5. return to the opp and paste this into the url.

any help would be appreaciated.

Cheers
Phill

ASKIIASKII
Hi Phill,

I think it should be like:

1. Create a Force.com site
2. Create a visual force page which would accept the params from the url and redirect it whereever you want to or you can achieve it on the vf page itself.
3. You may create a custom setting if you want to keep site url configurable which can be used in the code to set it dynamically.
4. you may share that link in the email template like - https://mysite-force.com/?param=xxxxxxxx
5. You may store that link in the field if you want to where the field can be accessible

Thanks,
ASKI
Lauren Honyotski 19Lauren Honyotski 19
I have this same requirement. Phill - did the above solution work for you?