I’m looking for some help on how to code the function and button so that I can open a PDF file that is contained within my DB. I assume I would have to have a function and then call that function in the xml.
Hi Robert
This can be easily accomplished simply by using the component.
So, assuming you have a DB object called product
and there is field on product
called <field name="catalog_pdf" label="Catalog PDF" type="attachment" media="application/pdf" />
which you use to store PDF files, then you can access that file in your app view as follows.
<var name="product" type="product" />
<display-file bind="inspection.catalog_pdf" />
I hope this helps