You need to sign in to do that
Don't have an account?
Related list at VF Page that is being accessed via guset user at saleforce site
Hi,
I wanted to confirm it is possible to display the Field_Service_Report__r(custom object),
Notes and Attachments, OpenActivities and other related list on a VF page that is being accessed via guset user at saleforce site, in admin mode it works fine.
My VF Page <apex:page action="{!CheckSession}" controller="CaseDetailController" showHeader="true" cache="false" sidebar="true" tabStyle="Case"> <chatter:feedwithfollowers entityId="{!objcase.Id}"/> <apex:form > <apex:pageblock mode="maindetail" title="Case Detail"> <apex:outputpanel > <apex:pageblocksection title="Case Information" showheader="true" collapsible="true" columns="2"> <apex:outputfield value="{!objcase.CaseNumber}"/> <apex:outputfield value="{!objcase.OwnerId}"/> <apex:outputfield value="{!objcase.Origin}"/> <apex:outputfield value="{!objcase.Priority}"/> <apex:outputfield value="{!objcase.Status}"/> <apex:outputfield value="{!objcase.Stage__c}"/> <apex:outputfield value="{!objcase.Type}"/> <apex:outputfield value="{!objcase.Reason}"/> <apex:outputfield value="{!objcase.CreatedDate}"/> <apex:outputfield value="{!objcase.ClosedDate}"/> <apex:outputfield value="{!objcase.Site__c}"/> <apex:outputfield value="{!objcase.AssetId}"/> <apex:outputfield value="{!objcase.AccountId}"/> <apex:outputfield value="{!objcase.ParentId}"/> <apex:outputfield value="{!objcase.Is_Expenses_Claimed__c}"/> </apex:pageblocksection> <apex:pageblocksection title="Contact Detail" showheader="true" collapsible="true" columns="2"> <apex:outputfield value="{!objcase.ContactId}"/> <apex:outputfield value="{!objcase.Contact.Phone}"/> <apex:outputfield value="{!objcase.Contact.MobilePhone}"/> <apex:outputfield value="{!objcase.Contact.Email}"/> <apex:outputfield value="{!objcase.Contact.Fax}"/> </apex:pageblocksection> <apex:pageblocksection title="Description Information" showheader="true" collapsible="true" columns="1"> <apex:outputfield value="{!objcase.Subject}"/> <apex:outputfield value="{!objcase.Description}"/> </apex:pageblocksection> <apex:pageblocksection title="Web Information" showheader="true" collapsible="true" columns="2"> <apex:outputfield value="{!objcase.SuppliedCompany}"/> <apex:outputfield value="{!objcase.SuppliedEmail}"/> <apex:outputfield value="{!objcase.SuppliedName}"/> <apex:outputfield value="{!objcase.SuppliedPhone}"/> </apex:pageblocksection> <apex:pageblocksection title="I&C Detail" showheader="true" collapsible="true" columns="2"> <apex:outputfield value="{!objcase.P_O_Number_I_C__c}"/> <apex:outputfield value="{!objcase.P_O_Date_I_C__c}"/> </apex:pageblocksection> <apex:pageblocksection title="Case Assignment" showheader="true" collapsible="true" columns="2"> <apex:outputfield value="{!objcase.Service_Center__c}"/> <apex:outputfield value="{!objcase.Engineer_Vendor__c}"/> </apex:pageblocksection> <apex:pageblocksection title="System Information" showheader="true" collapsible="true" columns="2"> <apex:outputfield value="{!objcase.CreatedById}"/> <apex:outputfield value="{!objcase.CreatedDate}" id="createddate" label="Created Date"/> <apex:outputfield value="{!objcase.LastModifiedById}"/> <apex:outputfield value="{!objcase.LastModifiedDate}"/> </apex:pageblocksection> </apex:outputpanel> </apex:pageblock> </apex:form> <apex:relatedList subject="{!$CurrentPage.parameters.Id}" list="Field_Service_Report__r"/> <apex:relatedList subject="{!$CurrentPage.parameters.Id}" list="CombinedAttachments"/> <apex:relatedList subject="{!$CurrentPage.parameters.Id}" list="OpenActivities"/> <c:CaseComments CasesId="{!objcase.Id}"/> <c:CaseHistory CasesId="{!objcase.Id}"/> </apex:page>
My APEX Controller public class CaseDetailController { public case objcase{get;set;} public CaseDetailController () { } public pageReference CheckSession() { objcase = new case(); objcase = [SELECT AccountId,AssetId,BusinessHoursId,CaseNumber,ClosedDate,CommunityId,ContactId,Contact.Name,Contact.Phone,Contact.MobilePhone,Contact.Email,Contact.Fax,CreatedById,CreatedDate,Created_By__c,CreatorFullPhotoUrl,CreatorName,CreatorSmallPhotoUrl,Description,Engineer_Vendor__c,HasCommentsUnreadByOwner,HasSelfServiceComments,Id,Invoice_Date__c,Invoice_Number__c,IsClosed,IsDeleted,IsEscalated,Is_Expenses_Claimed__c,LastModifiedById,LastModifiedDate,LastReferencedDate,LastViewedDate,Origin,Other_Problem_Reported__c,OwnerId,ParentId,Priority,Problem_Reported__c,P_O_Date_I_C__c,P_O_Number_I_C__c,Reason,Remark__c,Service_Center__c,Site__c,SLAViolation__c,Stage__c,Status,Subject,SuppliedCompany,SuppliedEmail,SuppliedName,SuppliedPhone,SystemModstamp,Type FROM Case where id=:apexpages.currentpage().getparameters().get('id') limit 1]; return null; } }
<apex:relatedList subject="{!$CurrentPage.parameters.Id}" list="Field_Service_Report__r"/>
<apex:relatedList subject="{!$CurrentPage.parameters.Id}" list="CombinedAttachments"/>
<apex:relatedList subject="{!$CurrentPage.parameters.Id}" list="OpenActivities"/>