function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sravan1.3948243917859526E12sravan1.3948243917859526E12 

How to Pull the data from two tables by using soql-How to get account names for account who supply part p2.

I have two tables -
accounts                                            products
id    acct name   weight           acct_id    product #    name        status
a1   raju                 25                   a1              p1                  nut              hold
a2   john                15                   a2              p2                  bolt             open 
a3   ajay                 10                   a3              p2                  screw         open
a4    ravi                  05                  a4              p3                  cam            hold
Nirmal ChristopherNirmal Christopher
The best way to pull data from multiple objects using Apex class is,  design a wrapper class and define a custom data type and store that custom data type as a list and display the values stored in the list in the VF page using apex page block table or a repeat tag to iterate through the list. Copied a link from one of my blogs for ur reference. Feel free to ask me any questions

http://nirmalchristopher.blogspot.in/2013/10/been-out-for-quite-some-time-its-been.html