You need to sign in to do that
Don't have an account?
MattiasNordin.ax607
How to join in another object on a visual force page
Im trying to learn visual force pages and want to add information from the campaign object on a contact visual force page. How can that be done?`
I guess the URL need to contain input for both objects. How does that work?
https://flir.secure.force.com/offer?id=0032000000PTk9aAAD&rCC=1234
id=0032000000PTk9aAAD is somehow inputted to the contact controller. How do i send input to the custom class that fetches info from the campaign object.
(im new to java. have only scripting experience. trying to learn)
Checkout the following post.
http://salesforcesource.blogspot.com/2008/10/how-to-create-custom-related-list-on.html
I hope this will help.
Else you can check the integration logic of the Standard controller and extension class in the same code.
Basically you can send some input from visual force page for a compaign object through <apex:param> component. go throught the sample code given below :
<apex:page standardController="Contact">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are displaying contacts from the {!contact.name} .
Click a contact's name to view his or her details.
</apex:pageBlock>
<apex:pageBlock >
<apex:form >
<apex:dataTable value="{!contact.CampaignMembers}" var="compaignmember" cellPadding="4" border="1">
<apex:column >
<apex:facet>Name</apex:facet>
<apex:commandLink >
{!compaignmember.Campaign.Name}
<apex:param name="cid" value="{!compaignmember.CampaignId}"/>
</apex:commandLink>
</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
<apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false" title="false"/>
Hope this helps.