Salesforce Asked on February 16, 2021
For Visualforce pages the Standard New-Button created by <apex:detail>
doesn’t work correctly inside Visualforce containers on Flexipages.
Scenario:
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 https://YOUR_DOMAIN.salesforce.com/a05/e?CF00N0Y000005N2De=10009+%E2%97%8F+Test+AG+Uwe+1+%E2%96%B6+2016+%E2%96%B6+2016&CF00N0Y000005N2De_lkid=a000Y000009Eggj&retURL=%2Fapex%2FtryPage_projectStdCtrl_tempUwe%3FsfdcIFrameHost%3Dweb%26isdtp%3Dp1%26id%3Da000Y000009EggjQAC%26sfdcIFrameOrigin%3Dhttps%253A%252F%252Fxe301-dev-ed.lightning.force.com&isdtp=p1
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?
This has apparently been reported as a known issue with no listed workaround at this time. https://success.salesforce.com/issues_view?id=a1p3A000001Yn4bQAC
Answered by Joe Wildey on February 16, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP