1

So let me explain my issue.

We have a custom object example custom_object__c. We decided to override the detail page using our custom VF page.

SO we have one more VF page that will be home page of custom_object__c

In home page we are using

<apex:outputLink value="{!URLFOR($Action.custom_object__c.View, custom_object.id)}">
    {!custom_object.Name}
</apex:outputLink>

This link will redirect to detail page.

In detail Page We are using apex:dynamicComponent for related list. (Actually we are using custom setting to maintain the related list)

<apex:dynamicComponent componentValue="{!FundGroupRelatedLists}" />

Controller code

public Component.Apex.OutputPanel getFundGroupRelatedLists()
{
        Component.Apex.OutputPanel dynOutPanel= new Component.Apex.OutputPanel(); 
        for(Custom_setting__c objRelatedList: [SELECT Name FROM Custom_setting__c 
                                                WHERE Active__c = true ORDER BY Order__c])
        {
           Component.Apex.RelatedList dynRelList = new Component.Apex.RelatedList();
           dynRelList.list = objRelatedList.Name;
           dynOutPanel.childComponents.add(dynRelList);
        }
        return dynOutPanel;
    }

enter image description here

If I click on show more it redirect to home page..

Here I am facing Issue.. Seems like salesforce bug.

1 Answer 1

2

I am able to resolve this issue just removing the VF global variable action in my First VF page.

<apex:outputLink value="{!URLFOR($Action.custom_object__c.View, custom_object.id)}">
        {!custom_object.Name}
</apex:outputLink>

To

<apex:outputLink value="/{!custom_object.id}" >
      {!custom_object.Name}
 </apex:outputLink>

What I found. When we use the visualforce global variables action. It will append the redirect url with record Id.

Like this

/apex/myVFPage?retURL=myfirstVfpageTabURL&sfdc.override=1&id=a044B000000vwUjQAI

That is causing the issue. If we just pass the Id in url

Like

/apex/myVFPage?id=a044B000000vwUjQAI&sfdc.override=1

Then My show 5 more then It work fine... Looks like salesforce bug. I raised a support case. Let wait and see what salesforce say about this behaviour.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .