You need to sign in to do that
Don't have an account?
DNLZ
Display events from "child" record on Master record
Hi,
I've got 2 custom objects(let's assume they are named A and B) in my developer org. They are "linked" to each other via a lookup relationship and the thing I want to achieve is as follows:
B has a lookup to A so A has a related list of B objects. The thing I want to do now is display all the tasks and events that are scheduled on B on a "custom related list" on the A object.
I'm assuming that I can pull this off with some visualforce with a controller extension. But the question is how, and is this possible ?
I can break this down in 5 easy steps.
- Get all the B objects that are associated with A.
- In turn loop trough the B objects and get all their events and tasks.
- Store the events/tasks in some kind of array.
- Supply the array to a apex detail page / related list like element.
- Am I on the right track with this?
Thanks,
Daniël
Hi,
1) Make a Visualforce page and has object ‘A’ as standard controller and have extensions equal to your class name in which you bring the task and event of B object.
2) Customize the Visualforce page same as look and feel of related list
3) On object ‘A’ Edit the Page Layout and add the Visualforce page from Visualforce Pages section.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
1) Make a Visualforce page and has object ‘A’ as standard controller and have extensions equal to your class name in which you bring the task and event of B object.
2) Customize the Visualforce page same as look and feel of related list
3) On object ‘A’ Edit the Page Layout and add the Visualforce page from Visualforce Pages section.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
So it would look something like this:
<apex:page standardController="Opportunity" extension="getActivities>
</apex:page>
Then i would have an Apex class named "getActivities" with some methods that will create the list filled with tasks and events right ?