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
sf11sf11 

Can I display CRM Content work space and files on a site page ?

I would like to make content workspace files available on a force.com site page ( for un-authenticated user). Is this possible ?

 

If the answer is yes, then where and how do I set content workspace permission for un-authenticated user. In the workspace permission menu, I do not see an option to include unauthenticated user for view permission.

I do not want to use cutomer portal or  partner portal for this purpose. Thanks !

Best Answer chosen by Admin (Salesforce Developers) 
SathyaincampusSathyaincampus

Crazy... I found the issue :D

it was my mistake.. 

There are two objects, one is contentversion and another is contentdocument.

I was giving the id of contentdocument (in place of <contentversionid>) in the below url.. when i changed it to contentversion id it downloaded the document from the sites (authenticated through partner portal)

http://<siteurl>/<siteprefix>/sfc/servlet.shepherd/version/download/<ContentVersionId>?asPdf=false&

 

Thanks everyone.

All Answers

paul-lmipaul-lmi

there's no native way to display Content in Visualforce, let alone security to allow it to be exposed via Sites.  sorry to be the bearer of bad news.

sf11sf11

Yikes !

bob_buzzardbob_buzzard

The only way that we've found to make any content available is to create a content delivery and put the delivery URL in a link on the site page. Its a somewhat clunky and time consuming process I'm afraid.

sf11sf11

Actually I found out a way to expose content files on a site page for unauthenticated user after starting this thread. Not a very clean approach but does the job.

 

Here are the steps

 

1- Create a VF page to query and display content version table records

2- Creat a public group and add guest site user to the public group

3- Add view permission for this public group for the content workspace

4- Expose the VF page in step #1 on a site page.

5- The displayed list of files on site page will have a field for content delivery URL. User clicks this URL to view the file.

 

The process to add content delivery link to each published doc is a manual process. Yet to figure out how to automate this.

 

bob_buzzardbob_buzzard

Yeah, the automation of content deliveries is something that' we also battled for some time. Content doesn't seem to be fully integrated with the rest of the system - it had some improvements around a year ago, but it seems like the focus shifted away from it after that.

ShawnFShawnF

See if this helps any...

 

Take a look at this thread and, in particular, look at the reply from Bulent marked as the "solution".

 

http://boards.developerforce.com/t5/Force-com-Sites/Make-ContentVersion-downloadable-accessible-via-Sites/td-p/152182

SathyaincampusSathyaincampus

Hey Bob,

 

    I am facing the same issue now. Need to access/download the Salesforce CRM Content Document from within Sites (using Partner portal authentication). Can you please let me know how we can do that? Can this be done now?

 

We are trying to access the document using this url :-

<SiteURL>/sfc/servlet.shepherd/version/download/<MyDocumentId>

 

is this correct? but its not working :(   please help..

 

Regards

Sathya

bob_buzzardbob_buzzard

Does the partner portal user have the content feature license?

SathyaincampusSathyaincampus

yes bob, I have given all necessary permissions and the user has content feature license as well..

SathyaincampusSathyaincampus

Crazy... I found the issue :D

it was my mistake.. 

There are two objects, one is contentversion and another is contentdocument.

I was giving the id of contentdocument (in place of <contentversionid>) in the below url.. when i changed it to contentversion id it downloaded the document from the sites (authenticated through partner portal)

http://<siteurl>/<siteprefix>/sfc/servlet.shepherd/version/download/<ContentVersionId>?asPdf=false&

 

Thanks everyone.

This was selected as the best answer