You need to sign in to do that
Don't have an account?
Jay reddy
Custom object as a related list to Case Object
Hi Everyone,
I have requirement based on the below conditions.
3 objects [Case, Contact, CustomObj]
Contact and CustomObj have lookup relationship.... and case is created based on contact.
My requirement is CustomObj appears as a related list in CONTACT record... I need bring that same CustomOBJ related list to CASE records whenever that particular CONTACT is added or CASE created on that CONTACT.... How can I achieve this.. I tried to edit layout but no luck it is not showing as related list instead appear in Extended lookup area...
I have requirement based on the below conditions.
3 objects [Case, Contact, CustomObj]
Contact and CustomObj have lookup relationship.... and case is created based on contact.
My requirement is CustomObj appears as a related list in CONTACT record... I need bring that same CustomOBJ related list to CASE records whenever that particular CONTACT is added or CASE created on that CONTACT.... How can I achieve this.. I tried to edit layout but no luck it is not showing as related list instead appear in Extended lookup area...
<apex:page showHeader="true" sidebar="true" standardController="Case">
<apex:relatedList subject="{!Case.Contact}" list="CustomObjs__r" />
</apex:page>
Or you could add a lookup to the Case on your CustomObj and auto populate it using either apex or a flow.
All Answers
<apex:page showHeader="true" sidebar="true" standardController="Case">
<apex:relatedList subject="{!Case.Contact}" list="CustomObjs__r" />
</apex:page>
Or you could add a lookup to the Case on your CustomObj and auto populate it using either apex or a flow.
As per my understanding, there s no relationship between case and custom object. So following approach needs to be take :
1. Create a lookup and relate case to the custom object using trigger.
2. Visualforce page if no relation between case and custom object is required.
Thanks
Piyush
sfpiyush@gmail.com
I don't see the Visualforce page in the edit pagelayout
Thanks for the idea!! It worked but I have one more thing to ask ... I have added the custom related list with your idea... Now I would like to place it on the top of the Standard Related list... Could you please let me know the way??
<apex:page>
-----------
<apex:detail relatedList="true" inlineEdit="true" > </apex:detail>
<apex:pageblock id="CustomList" title="Licensee" >
<apex:pageBlockTable value="{!lcnse}" var="l" rendered="{!NOT(ISNULL(lcnse))}">
<apex:column value="{!l.Name}"/>
<apex:column value="{!l.User__c}"/>
<apex:column value="{!l.ProductName__c}"/>
<apex:column value="{!l.State__c}"/>
<apex:column value="{!l.EndDate__c}"/>
<apex:column value="{!l.Support__c}" />
</apex:pageBlockTable>
<apex:outputLabel value="No records to display" rendered="{!(ISNULL(lcnse))}" styleClass="noRowsHeader"></apex:outputLabel>
</apex:pageblock>
</apex:form>
<!-- <apex:relatedList list="Cases"/>
<apex:relatedList list="Comments"/>
<apex:relatedList list="ActivityHistories"/>
<apex:relatedList list="CombinedAttachments"/>
<apex:relatedList list="Time_Trackings__r" />
<apex:relatedList list="Case" subject="{!Articles}" /> -->
</apex:page>
Bascially, I tried to do by <apex:detail relatedList="false" inlineEdit="true" > </apex:detail> and gave the standard related list as below.. but for Emails, Case Comments, Articles etc it's throwing error as Emails/CaseComments/... are/is not a valid child relationship name for entity Case.
I don't know, I just put the list at the bottom of my page layout. If you find an answer please share, I'd love to know!