For Visualforce pages the Standard New-Button created by
<apex:detail> doesn't work correctly inside Visualforce containers on Flexipages.
I've put a Standard Visualforce Component on my Flexipage, pointing to a Visualforce page consisting of the following markup:
<apex:page standardController="elfBCProject__c" tabStyle="elfBCProject__c" recordSetVar="allItems" > <apex:detail inlineEdit="false" relatedListHover="false" relatedList="true" showChatter="false" title="true" ></apex:detail> </apex:page>
In my case it's for a Custom Object called
elfBCProject__c - but you can use any Object for which a Flexipage is used.
Now inside that embedded VF Page most things work fine, but the Standard "New" Button for related lists has a crucial flaw: press it, and
sforce.one beams you to the LEX-Version of the Record Create UI. So far, so good, but the Lookup towards the parent object is no longer populated as it MUST be, but it's just EMPTY:
Expected behavior would be like in Aloha:
Inspection of the button shows:
The reason behind all this is clear: LEX doesn't support the URL-hacking like this
As an unfortunate, Salesforce uses these parameters in their Aloha code and the Link-wrapper injected for LEX-embeding plus the LEX UI for Creating Objects can't deal with that correctly now...
Does anyone know a quick and dirty workaround to fix this without the need of Flows or Actions? We have > 30 different Custom Object, and we only want to be able to create New objects in related lists. Creating Flows or Actions is a total Overkill for that. Using the Lightning Components for related list is unfortunately also not an option, because we are assembling many objects on one Flexipage (Standard Related List show only the one for the Flexipage-Record itself) and we need way more costomizability (e.g. Contacts as Card-Layout is just a show-stopper).
So how do we get the New-Buttons to life again... ?
Will Spring' 17 fix this? Summer'17? Or later? Or never?