In a Tabs component, I am using a Record Detail component along with custom components in the Opportunity object. The goal of the custom pages/components is to display fields spread in different tabs and grouped logically. The custom pages use a recordEditform component to retrieve, display and save data. In one of my pages, I have to separate the data in 2 different sub-tabs. Sub-tab #1 is always displayed, sub-tab #2 is displayed conditionally. I manage the condition in an aura:if component. The criteria of the aura:if is given in a field value in the current record. So I want to intercept the field value and set it in an aura:attribute which will be used by the aura:if. So I handle the 'onload' event to get the record data and set the attribute. and use var data = evt.getParam("recordUI"); for that.

Problem : evt.getParam("recordUI") returns 'undefined'.

What could be the reason for recordEditForm to return 'undefined' ? Is using the Record Detial component with custom components which use a recordEditForm an issue ? What could be a workaround ?

Thank you for your help.

Component :

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global">
<aura:attribute name="auraIfCriteria" type="boolean" />

<lightning:recordEditForm aura:id="MyCustomPage"

Controller :

    hOnload : function( component, evt, helper )    {
        var data = evt.getParam("recordUI");  // returns 'undefined'

I believe your capitalization is off. It should be event.getParam("recordUi"), lowercase i.

  • Yes. Just realized that. Thank you.
    – fredbe
    Mar 8 '21 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.