Well you can either use the already-built-in printable view (it's the Printable View link at the top right of every detail page) or you can create a Visualforce page that generates a PDF. The former is much simpler of course.
This sControl mimics the regular print page you would get within Salesforce. It is written to pull fields from Account but you should tweak it to suit your needs. Note: due to the fact that you will be accessing this sControl from a button/link on the detail page you can use regular merge fields in your sControl (ie {!Account.Name}).
Second, you'll need to create a button or link for use on your detail page. In my example you would click Setup > Customize (under App Setup) > Accounts > ButtonsAndLinks and create a new custom detail button. Make sure the button opens a new window and it should also call your sControl from above.
Third, you need add the custom button to your page layout.
As we know the Accounts table holds multiple field. How can we let it display with a certain rule? e.g display account.name where billing country like USA
My question would be more of, If i'm looking up a custom object's table, and there's multiple entries in it. How can i have a page that will display entries in this object under a condition?
In the example I wrote for this post I am using merge fields. If you need to pull back different records or certain fields under certain circumstances then I suggest you use the AJAX toolkit and use a query statement to get exactly what is needed for your conditions.
If you click the "Getting Started" tab at the top of this page it will show you some of the tools that are available to you as a developer and you can find more information about the AJAX toolkit and the API. This documentation should get you the information you need to better understand how to query and display results to the screen.
This sControl mimics the regular print page you would get within Salesforce. It is written to pull fields from Account but you should tweak it to suit your needs. Note: due to the fact that you will be accessing this sControl from a button/link on the detail page you can use regular merge fields in your sControl (ie {!Account.Name}).
As we know the Accounts table holds multiple field. How can we let it display with a certain rule? e.g display account.name where billing country like USA
thks
My question would be more of, If i'm looking up a custom object's table, and there's multiple entries in it. How can i have a page that will display entries in this object under a condition?
Hi Sasayong,
In the example I wrote for this post I am using merge fields. If you need to pull back different records or certain fields under certain circumstances then I suggest you use the AJAX toolkit and use a query statement to get exactly what is needed for your conditions.
If you click the "Getting Started" tab at the top of this page it will show you some of the tools that are available to you as a developer and you can find more information about the AJAX toolkit and the API. This documentation should get you the information you need to better understand how to query and display results to the screen.
Hope this proves useful,
-greg