You need to sign in to do that
Don't have an account?

Get all PDFs from all Quotes from an Opportunity - Apex Inner Join?
Hello guys,
I have the following feature request:
On the opportunity level I want to see all pdfs from all quotes from that very opportunity. So I think (hopefully) this is something Apex can do for me.
As I am not much of a developer I was thinking I need something like:
Any advice is appreciated
Thanks a lot!
I have the following feature request:
On the opportunity level I want to see all pdfs from all quotes from that very opportunity. So I think (hopefully) this is something Apex can do for me.
As I am not much of a developer I was thinking I need something like:
ListOfPDFs = [SELECT Id, ... FROM Quote (SELECT Id,... FROM QuotePDF) WHERE Opportunity.Id = currentOpportunityIn the end I want to display it as a simple table in visualforce.
Any advice is appreciated
Thanks a lot!
You could run the particular soql query from the query editor to see if the soql is returning any records and if not make adjustments accordingly to meet your requirement.
>> https://www.sfdc99.com/2013/06/09/example-how-to-write-a-cross-object-soql-query/
>> https://www.sfdc99.com/2013/06/24/example-how-to-write-a-cross-object-soql-query-part-2/
I hope the above links could help in reference to get your solution.
Regards,
Anutej
Let me know if the following query helps
Anudeep
but it results in:
ERROR at Row:1:Column:28
Didn't understand relationship 'QuoteDocument' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
The child relationship name is QuoteDocuments
Let me know if it helps
Anudeep
so I tried running the query but no results turn up even there exists a pdf in that quote. Is it even possible to access the pdf Ids?
Furthermore I tried the following:
Initially I was aiming for public List<QuoteDocuments> pdfs {get; private set;} but this is not working.
My VF Page only returns the list of quotes
This is the part where I want to see the pdfs :<
class:
visualforce page:
For reasons I don't understand <apex:outputField value="{!pdf.ContentVersionDocumentId}" /> is directly creating a link. Which is actually what I want in the end but it has some weird behaviour when opening it in a new tab. In addition to that there seems to be a problem with the "name" when I create my quotes via a flow where the names are being defined.