You need to sign in to do that
Don't have an account?
Tyler Morgan 9
Component showing records from custom object
On our Opportunity page users have a field to choose an Engineer. These engineers are stored on a custom object.
I would like to display a VF component on the sidebar of the Opp page showing the past Engineer records used on Opps across the parent Account. There typically wouldn't be more than 2-4 over the history of the account. It would also be acceptable for this to display on the Account page.
I have some experience with VF, but don't know where to start with this project going across objects.
Yes this can be done easily if you follow the below steps:
- Create a lightning component and make sure it is available for flexi pages.
- In the init method query the related opportunities of the account where engineer field is not blank.
- You can store all these values in a list.
- Now display this list in your component in whatever way you want to show it to the users.
- Add the component in the Opportunity flexi page.
Let me know if you need any help with the lightning code. You can reach out to me on:Gmail: abhibansal2790@gmail.com
Skype: abhishek.bansal2790
Thanks,
Abhishek Bansal.
All Answers
Thank you for your response.
We're working in Lightning. I suppose I would do it as a component.
But yeah, I want to know for Account A, which has had ~100 opportunities, which engineers have been chosen over the span of those opps.
Why would I need to use field history tracking if I'm only interested in the current values of the field in these opps?
Yes this can be done easily if you follow the below steps:
- Create a lightning component and make sure it is available for flexi pages.
- In the init method query the related opportunities of the account where engineer field is not blank.
- You can store all these values in a list.
- Now display this list in your component in whatever way you want to show it to the users.
- Add the component in the Opportunity flexi page.
Let me know if you need any help with the lightning code. You can reach out to me on:Gmail: abhibansal2790@gmail.com
Skype: abhishek.bansal2790
Thanks,
Abhishek Bansal.