First of all i am very new in salesforce and not have anything to do with programming however i have been trying to finish my first project by getting help online. I have created a BIG OBJECT "Email_Archive_b" and VF page "EmailArchive" to show the Email data in table. In the Email Archive VF page I have a a "ParentID__C" which holds the ID of "case's Emails". when i import the data from workbench all the cases data is shown in VF page
IF you look at the above sceenshot The case is "test case 1" and Its ID is "00014319" but the data is shown of all the case's Emails. Is there a way where i can only see data of the related case on their Specific VF pages.what should i change in my apex class and VF coding that i can get the required result when i import data.
public class EmailArchive{
public List<Email_Archive__b> listOfEmailArchive {get;set;}
public EmailArchive(){
listOfEmailArchive = [SELECT ID__c, Parent_ID__c, Message_Date__c, Subject__c, Text_Body__c, HTML_Body__c, FROM_ADDRESS__c, TO_ADDRESS__C FROM Email_Archive__b];
if(listOfEmailArchive == null){
listOfEmailArchive = new List<Email_Archive__b>();
}
}
}
VF code:
<apex:page controller="EmailArchive" title="Email Archive">
<apex:sectionHeader title="EmailArchive" subtitle="All Archived Email"/>
<apex:pageBlock >
<apex:pageBlockSection columns="1" >
<apex:pageBlockTable value="{!listOfEmailArchive}" var="email">
<apex:column value="{!email.ID__c}"/>
<apex:column value="{!email.Parent_ID__c}"/>
<apex:column value="{!email.Message_Date__c}"/>
<apex:column value="{!email.Subject__c}"/>
<apex:column value="{!email.Text_Body__c}"/>
<apex:column value="{!email.HTML_Body__c}"/>
<apex:column value="{!email.FROM_ADDRESS__c}"/>
<apex:column value="{!email.TO_ADDRESS__c}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
Index Schema Screenshot
I would appreciate your help please Thank you