0

It's possible to create a lookup in visualforce page to choose one of two visualforce pages with the data from object?

I have one object, and I have to choose one pdf or another according the value choosed in picklist?

I appreciate your help.

6
  • try this link "salesforce.stackexchange.com/questions/20840/…".., "sfdchack.blogspot.in/2013/01/…" Commented Jun 20, 2014 at 13:56
  • welcome to salesforce.stackexchange user8715. Your questions is a bit confusing to me (could just be me thoug), could you maybe add some more detail, or maybe show us what you've already got? Commented Jun 20, 2014 at 14:15
  • Hello Samuel De Rycke I've got 2 visualforce pages rendered PDF. When I create a new record I have a button create pdf to a visualforce page, and in this new window I have to choose in a lookup or link lists, which visualforce page I want and send me to new pdf, but with the information from record.
    – user8715
    Commented Jun 20, 2014 at 14:24
  • What have you done so far? If you share what you have written, maybe someone can help out.
    – AslamK
    Commented Jun 20, 2014 at 15:19
  • Just maked the visualforce page with table, rendered pdf. Let me see if I can explain better. After I create a record I can choose between 2 different pdf type. So I have a button Pdf, but inside this button I have to choose 1 of 2 pdfs. And this is my problem I don't know how create this part
    – user8715
    Commented Jun 20, 2014 at 15:33

1 Answer 1

1

If you are creating a custom button, set the content source to URL then you can use a formula to set up your conditions and resulting pages... /apex/pdfPage1?id={!MyObject__c.Id}

2
  • The URL doesn't work IF(ISPICKVAL(tipo__c, "X"), /cs20.salesforce.com/apex/page1?={!Invoice__c.Id}, IF(ISPICKVAL(tipo__c, "Y"), /cs20.salesforce.com/apex/page2?={!Invoice__c.Id}))
    – user8715
    Commented Jun 21, 2014 at 14:18
  • you don't need the cs20.salesforce.com, just have the /apex... that way it will work in test and production environments. If you want to hardcode the instance then start with cs20...
    – Jenny B
    Commented Jun 23, 2014 at 16:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .