We have previously seen how to get the values of a record by means of the standard controller. But we can also show the field values in a further formatted way by means of additional controllers.
In this chapter, we will see how to show the fields of an object and the data of a particular table in a Master-detail relation.
When we need to show the fields of a record in a arranged manner with column headers, rather than just the labels and values, we can use the OutputField choice. The code given below shows the apex program to show the filled data from Contact. As you can see, we do not want the labels to be in place to specify the field values.
To show the result of the above code, we use the ID of the record as defined in the previous chapter. The result shows the resulting output viewing the field values of the records along with column headers.
We can show all the records of a details table by taking a value from a master table. For instance, we can show all the contacts related with an account. In such case, we use the iteration component which in our case is the contacts table linked to account. Underneath is the code to show all the contacts related with the Account table.
On previewing the output form the above code, we get the resulting result.
Salesforce Related Interview Questions
|AJAX Interview Questions||Software Engineering Interview Questions|
|Salesforce Admin Interview Questions||Salesforce Developer Interview Questions|
|Apex Interview Questions||Visualforce Interview Questions|
|Salesforce Crm Interview Questions||Salesforce Lightning Interview Questions|
|Salesforce Report And Dashboard Interview Questions||Salesforce Integration Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.