I had a working code on Winter 18 which override the standard submit event on recordEditForm component but it is not working on Spring 19. When I try to retrieve fields using event.getParam('fields'); it returns undefined.

This is my code:


                                          onsubmit="{!c.handleSubmit}"  >

                    <lightning:messages />

Some input fields

               <footer class="slds-modal__footer">
                <lightning:button label="{!$Label.c.E2PC_Cerrar}" onclick="{!c.cancel}" variant ="neutral"/>
                <lightning:button label="{!$Label.c.E2PC_Guardar}" type="submit" variant ="brand"/>


handleSubmit: function(component,event,helper){
            var fields = event.getParam('fields');
            var gastoTotal = component.get("v.gastoTotal");
            if (gastoTotal < fields.E2PC_Objetivo_Accionable__c){
                    "header": "¡Error!",
                    "message": "El objetivo accionable no puede ser mayor que el gasto total"

Thank you.

| improve this question | | | | |
  • 1
    I replicated the same code and was able to get value of the field. Can you check if the API name is proper or not and lightning:inputField is referencing that field? – Pranay Jaiswal Jan 10 '19 at 18:55
  • please share the Some input fields of your markup – Itai Shmida Jan 13 '19 at 6:28
  • This might be related to a Spring '19 bug that I have a ticket in for now. I'll post an update here as soon as I have one. – Shane Steinfeld Jan 16 '19 at 18:34
  • @ShaneSteinfeld did you ever get a response from SF Support? I am also having same issue it worked for me yesterday and then suddenly stopped. – apple123 Jun 7 '19 at 16:20
  • @apple123 -- I did, but it winds up it wasn't related. I know we fixed this, but I don't remember what the issue was. :( Sorry about that! – Shane Steinfeld Jun 8 '19 at 22:46

Your Answer

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

Browse other questions tagged or ask your own question.