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
vanrentvanrent 

display pdf on home page; upsert nightly

We have a document created nightly outside of salesforce that I need to push up to sf each night and display on the user's home page. I thought I would take this in baby steps, so I've manually uploaded it to files.

I created a VF page and was given this code for it:


<apex:page >
  <apex:iframe src="https://dtna--dev02--c.cs23.content.force.com/servlet/servlet.FileDownload?file=00P180000024PAZ" width="300px" scrolling="true" id="theIframe"/>
</apex:page>

Although I'm still a beginner, I know I need to switch out for my sf instance and id (see underlined items). I tried:

<apex:page >
  <apex:iframe src="https://na39.salesforce.com/servlet/servlet.FileDownload?file=0690L000004p7Mz" width="300px" scrolling="true" id="theIframe"/>
</apex:page>

And I get the following error:
Unable to Access Page
The value of the "file" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information

What did I do wrong?

In addition, we want to upload a new document nightly, with the same name. I am familiar with dataloader, but not sure where I need to upsert it.