Saving PDF and Viewing Them

In summary:

  1. I create a PDF via bot
  2. Save the full path to the sheet
  3. Go to the invoice's details & click the link to view the PDF
    or
  4. Go to the invoice's details & click on the action..
  5. File can't be found?

I'm probably missing something simplistic here.

So I have a bot that saves my invoice as a PDF, which works flawlessly

DayToDataInc_0-1746106830110.png

Here is the invoice saved to my drive in the correct directory.

DayToDataInc_1-1746106870384.png

PDF is correct

DayToDataInc_5-1746107341412.png

 

I am saving the full path to a column (non virtual)  in the same bot after the PDF is created. Here you can see invoice 1274

DayToDataInc_2-1746107037819.png

Here is the data, showing that it's saved.

DayToDataInc_3-1746107234719.png

When I go to the view, the link is active

DayToDataInc_4-1746107298131.png

I even created an action to open the PDF externally

DayToDataInc_6-1746107731734.png

but when I click on it in the detail or click the action button, I get the following error.

        <html>
        <body style="margin:20px">
          <div>&#39;CRM-5099355/Invoices/Invoice_1274.pdf&#39; not found</div>
          <div>Probable cause: N/A</div>
          <div><ul><div>
   <div>Path: Root</div>
   <div>Result: FAILURE</div>
   <div>Message: N/A</div>
   <details>
<ul>
<li><div>
      <div>Path: Root</div>
      <div>Result: FAILURE</div>
      <div>Message: N/A</div>
      <details>
<ul>
<li><div>
         <div>Path: Root</div>
         <div>Result: Success</div>
</div>
</li>
<li><div>
         <div>Path: Root</div>
         <div>Result: FAILURE</div>
         <div>Message: N/A</div>
         <details>
<ul>
<li><div>
            <div>Path: Root</div>
            <div>Result: FAILURE</div>
            <div>Message: N/A</div>
            <details>
<ul>
<li><div>
               <div>Path: Root</div>
               <div>Result: FAILURE</div>
               <div>Message: N/A</div>
               <details>
<ul>
<li><div>
                  <div>Path: Root</div>
                  <div>Result: FAILURE</div>
                  <div>Message: N/A, Searching for &#39;CRM-5099355&#39;, File entry not found</div>
                  <details>

 

0 6 95
6 REPLIES 6

While saving the file name in the backend, please try starting with just 

"Invoices/......" rather than ""Appsheet/data/appname/Invoices...."

Didn't work. 

DayToDataInc_0-1746400561573.png

The data save as: 

DayToDataInc_1-1746400601928.png

 

One thing you may want to share is why it was necessary to create the action "View Invoices" .

Typically if the [Invoice File Path] is a file type column, you would have a system generated action to view that file.

In the example below, the column [Report_File] is of  "File" type and stores the file path as the screenshot below shows.

Suvrutt_Gurjar_0-1746419715371.png

The column in table is as follows

Suvrutt_Gurjar_1-1746419780881.png

Once a column is designated as file type, AppSheet automatically creates an associated system generated action as shown below to view that file in detail and summary views

Suvrutt_Gurjar_2-1746419940619.png

Please try making the  [Invoice File Path] column as  "File" type  and test if not already done so.

 

 

 

 

try "/Invoices/"

Didn't work...

DayToDataInc_2-1746400895773.png

 

This is what I was following originally: https://youtu.be/kgp-mnsUQPQ?si=0d5Pb97BWNy_7N38&t=611