You need to sign in to do that
Don't have an account?
Karthikeyan Chandran
VF page Help.
Hi Team,
I want to get opportunities that are related to case as a related list using VF page.
Can anyone help to fix this?
Thanks & Regards,
Karthikeyan Chandran
I want to get opportunities that are related to case as a related list using VF page.
Can anyone help to fix this?
Thanks & Regards,
Karthikeyan Chandran
Thanks for the detail requirement please use below code written as aper your requirement. You can customize the look and feel as per your further requirement.
VF page
Apex Controller
Thanks
Lokesh
All Answers
HI Chandra,
You can easily get Opportunities as a related list to achieve this
create a lookup field on opportunity object to Case and fill the lookup with case number.
Let me know if you have different scenario.
Thanks
Lokesh
Thanks for the quick response.
Here in case object i have Account lookup and Opportunity Lookup. i want show the opportunities list that are related to Account.
Ex: Case -> Account-> Opportunities
Account have more than 1 Opportunities.
Thanks for the detail requirement please use below code written as aper your requirement. You can customize the look and feel as per your further requirement.
VF page
Apex Controller
Thanks
Lokesh
You can also try something like this.
Visualforce Page:
Controller:
Thanks
Brahma
To embedded the VF page in Standard detail page you have to set standard controller of the same object in which you are trying to add so use extension for your custom controller BTW Happy coding.
Thanks
Lokesh
I tried your suggestion and it's pulling only one opportunity.
My case record, related to one Account and this Account have 10 Opportunities.
Can you try putting System.debug('$$$'+lstOpportunity ) and check what values are coming or you can run these SOQL in developer console to verify the Record level.
Because I have tested this already and for me, it's working fine.
Let me know if you have any concern.
Thanks,
Lokesh
I Think you don't have full permission to query all the record in your controller as above displaying in System.debug logs you have only one record did you tried through SOQL query editor in developer console.
Thanks,
Lokesh
My appologies for the delay. the VF page in opportunity view i am getting properly in my page and it's working as expected.
Thanks once again.
Thanks & regards,
Karthikeyan Chandran