You need to sign in to do that
Don't have an account?
Display an unrelated list?
Looking to display a list of records within an unrelated object. We are making an employee review object, and would like to display all the accounts that user owns on the review object. We will be able to grab the user's ID on that review object - they aren't the owner, but are in a lookup field. I'm invisioning a bit of Visualforce, but I'm not sure how to get there. Any help is appreciated!
here's something simlar I did for displaying all the donations associated with a contact record - let me know if you need help adapting:
Controller
Page:
All Answers
here's something simlar I did for displaying all the donations associated with a contact record - let me know if you need help adapting:
Controller
Page:
btw: we call the page from a button on the contact record.
I've done something similar, same approach as Will. But we displayed the VF page as an in-line component on the record so the user wouldn't have to click a button. If you push it to the very bottom of the record detail section it'll (sort of) blend in and (kind of) look like the first related list.
OK, here is what I've got so far. Getting an error with Development_Plan__r.Employee_Name__r.Id
Why are you instantiating as an extension to the Account, rather than the Development_Plan? You're getting the ownerid from the Dev Plan, then gettting the list of the accounts based on that ID, right? I think if you just get rid of that section, it should work. Thus:
Try this, yo. The controller.getRecord() needs to grab the current record you're on, which is the Developer Plan, right?
Still getting the variable does not exist error: " Variable does not exist: Development_Plan__r.Employee_Name__r.Id"
Not sure whym because it very clearly does exist...
Is Employee name a lookup? If so, then you've already got the id - should just be Employee_Name__c?
Oh well.... was about to post it here. But guess problem is solved.
Cheers,
Sid
http://force.siddheshkabe.co.in
May the Force be with you.
Now I'm getting an "invalid conversion from runtime type" error when trying to build my VF page. Obviously, I have no clue what I'm doing...
The value in your pageblocktable should be your method "{!MyAccounts}", I think
Now I'm back to having an issue with the class. Saying the error is with this line...
The issue with above is that you have a page with an Account standard controller, and you are trying to convert the Account to a Development_Plan__c object. Try changing the standardController attribute to standardController="Development_Plan__c"