You need to sign in to do that
Don't have an account?
mustapha laouari 15
APEX redirect to Quote details page
Hi there,
i did a method supposed to redirct into Quote details page, but it doesnt couldyou help please.
the method is excuted success, but redirect doesn't work.
qid is the ID of the quote.
Many thanks
i did a method supposed to redirct into Quote details page, but it doesnt couldyou help please.
the method is excuted success, but redirect doesn't work.
qid is the ID of the quote.
Many thanks
public PageReference redirectQ(id qid){ System.debug('STARTING redirectQ: '+qid); quote q = [SELECT id, name FROM QUOTE WHERE id=:qid]; System.debug('quote q: '+ q); PageReference QuotePage = new PageReference(qid); System.debug('QuotePage: ' + QuotePage); QuotePage.setRedirect(true); return QuotePage; }
All Answers
has you can see i did a debug, to ensure the Qid is correct.
i extracted that qid from log, and when manually type the URL http://salesforce.../eedkn8df54df8
i can see the Quote details page.
strange, isn't it ?
this is the VF page, which is quite simple, a Headband on top, with just a Save button, and uder that an iframe to another VF page (in charge to display the quote details)
when press the Save button, it launch the SavePDF in charge to store the Iframe content in PDFquote (in PDF format), idea is after that it shoud go back to the SObject Quote details which should contains the PDF document attached.
Everything ok, except the rediect.
the VF page :
and the methods:
Thank you
so have moved the code of RedirectQ inside the savePDF method, and like this no error and it works fine !
MANY thanks for your assistance on this you are great !