function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

apex:relatedList behavior inconsistent - sometimes there is no saveURL

I am completely baffled by this behavior of the apex:relatedList.
I have a Visualforce page and I am adding 2 related list components like so in the page:
<apex:relatedList list="Children1__r" pageSize="15" subject="{!Parent__c}"/>
<apex:relatedList list="Children2__r" pageSize="15" subject="{!Parent__c}"/>

Both Children1 and Children2 are Master-Detail to Parent. (The only difference is that Children2 is also Master-Detail to another Object)

When I click the "New Children1" or "New Children2" button in the embedded related list I am taken to the New record page for that Object.
For "New Children1" the URL does not contain a saveUrl and therefore does not return me to the original VF page from which I launched the create.
For "New Children2" the URL contains the saveUrl and when I Save the new Children2 record I am correctly returned to the VF page which was my starting point.
Why doesn't SF always put the saveUrl when you launch create new record from an apex:relatedList component? Does anyone have an explanation as to why this is not consistent?

Thank you.
Nineta M.