If you have a document uploaded into your instance of Salesforce, it will have a record in the database in the ContentVersion
table. The ContentVersion object allows for versioning of the ContentDocument which is linked to a Salesforce record via the ContentDocumentLink.
You can use the following Apex code snippet to pass the relevant ContentVersion record to your WebViewer instance:
Then you can use the function to build your blob and pass it to WebViewer like so:
You can use
You can find a full code sample that implements opening documents in Salesforce on our Github repository.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales