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
JeT2686JeT2686 

Salesforce1 and Content Document/Versions

Hello,

We have a client that is highly integrated with the Content Library system in salesforce. They wanted to use this via salesforce1.

At the moment we have a visual force page which allows them to filter out content documents based on specific search criteria. However I can not find any way to link the user to the ContentDocument ( or ContentVersion ) when the app is being used in salesforce1. I looked into it for quite some time now and google has not proven itself useful in this case. To link to a ContentVersion it is not a standard salesforce link where you just post the sObject Id after the salesforce.com url. Instead the URL is formatted like this: https://SomeServer.salesforce.com/sfc/#version/ContentVersionID .

The way this URL is formatted causes a issue when being used with salesforce1 due to the sforce.one object. Since this object handles all URLs for salesforce when a user clicks on that URL we get a Modal popup which says there is a "Unknown Error : Unexpected token". I tested it and it seems the # is the culprit and sforce.one does not support the # sign in a link.

I also noticed in salesforce1 when you open up a document, such as a pdf, it would not open the ContentDocument page instead it would directly open the PDF.

I simply need a way to link users in salesforce1 vf page with the ContentDocument page, or at the very least directly to the Document which was uploaded. I did look at the VersionData and PathOnClient field, However I am not sure how i would use those, especially without refactoring the whole backend for this application.

Does anyone have any solutions for this or work arounds?

Thank you for taking the time to look at this.

-Dennis
Ashish_SFDCAshish_SFDC
Hi Dennis, 


Based on the usage there will be upgrades and updates to the Salesforce1 , Kindly post this as an Idea so that product management can look into this. 

https://success.salesforce.com/ideaPost


Regards,
Ashish
mangesh patilmangesh patil
Hi Dennis,
Could you find the solution for your issue. I am also facing the same issue.
Please revert in case you have found the solution.