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

How to get values in visualforce page
Hi all,
I have written a Visualforce PDF with extension class to call the list of contacts and a button on Button on Opportunity pagelayout .
The buttons works as if stagename == site visit it should give an error else open the PDF.
But here the problem is onclick javascript is working properly but im not getting the CONTACT values in visualforce page.
Visualforce page and Button is on Opportunity
Javascript:
var a = '{!Opportunity.StageName}'; if(a == 'Site Visit') alert('Please fill the Application Details'); else window.open('/apex/Application_PDF?scontrolCaching=1&id={!Opportunity.Id}');
Thanks in Advance...
Can you elobarate your query?
Hi,
I used the same code for Opportunity Detail button in my Dev org and I got the contact list in my Visualforce page which was rendered as PDF.
Please let me know your query in detail so that I can help you.
Thanks,
Hi Arjun,
Actually i was trying to get the list of contacts which should get the values in visualforce PDF, If i click on the button the page was opening but the contact values are not displaying. Did u used the same javascript in button?
I have a visualforce PDF in opportunity. In that PDF im calling fields from different objects like contacts,receipts....
so in in opportunity page button i gave onclick javascript as if status picklist is 'sitevisit' then the it should show an pop up window with an error message or open the PDF. here the problem is it is opening the PDF but the related object field values are getting displayed.
Thanku.
Hi,
Yes, I used the same Java Script code in my Opportunity detail button.
In my visualforce page I used <apex:repeat> tag to display the values from different objects.
Pls let me know your VF code so that I can help you.
Thanks.
Quit Big
Hi,
I dont see any flaw in ur VF code.
Are you fetching all the fields from Contact and other objects in your controller?
use ur method as getContacts() and return the values to the vf page.
Thanks.