You need to sign in to do that
Don't have an account?
Rajashri
Unknown Property Error in VF Page
Hi,
I am new to salsforce.I want to display the Campaign Members through VisualForce Page.I have wrriten the below code.I am getting the error as Unknown Property value.
Can anyone please help
VF page
<apex:page controller="callCampaignController">
<apex:sectionHeader title="My Call List"></apex:sectionHeader>
<apex:form >
<apex:pageBlock title="">
<!-- To show page level messages -->
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockTable value="{!CampaignMembers}" var="cm">
<apex:column value="{!cm.LeadId}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
public with sharing class callCampaignController {
private List<CampaignMember> CampaignMembers;
public List<CampaignMember> getCampaignMembers()
{
return CampaignMembers;
}
}
I am new to salsforce.I want to display the Campaign Members through VisualForce Page.I have wrriten the below code.I am getting the error as Unknown Property value.
Can anyone please help
VF page
<apex:page controller="callCampaignController">
<apex:sectionHeader title="My Call List"></apex:sectionHeader>
<apex:form >
<apex:pageBlock title="">
<!-- To show page level messages -->
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockTable value="{!CampaignMembers}" var="cm">
<apex:column value="{!cm.LeadId}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
public with sharing class callCampaignController {
private List<CampaignMember> CampaignMembers;
public List<CampaignMember> getCampaignMembers()
{
return CampaignMembers;
}
}
Try this:
Controller
public with sharing class callCampaignController {
private List<CampaignMember> CampaignMembers;
public List<CampaignMember> getCampaignMembers()
{
return CampaignMembers;
}
}
Page:
<apex:page controller="callCampaignController">
<apex:sectionHeader title="My Call List"></apex:sectionHeader>
<apex:form >
<apex:pageBlock title="">
<!-- To show page level messages -->
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockTable value="{!CampaignMembers}" var="cm">
<apex:column value="{!cm.LeadId}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
I can see the output as:
You must have added any field that were not presented in the object.
Thanks
Naveen
Hi Pratik
what changes have you done?I see the same code there
Rajashri
The code is giving error free output.
If it's giving you the error, can you please post the screenshot of the error page.
Thanks,
Pratik
Try 'Lead' insted of 'LeadID' and please let me know if it is still not working.
Regrads,
Sushil
Here are the screenshots:
Try these and post if you getting issues.
Thanks,
Pratik
I tried "Lead" also but i am still getting an errors.
Rajashri
go to that object and see wheather that flied is available or try use default ID.
Thanks
Naveen
That field is present in Object then also it's giving an error Invalid Property for ID also.Any Idea?
Can you try creating the Controller Class and Page again.
Thanks,
Pratik