0

I'm having a lightning component which works in desktop web browser and S1 mobile app. I'm having the following snippet in the component

JS:

component.find("recordHandler").saveRecord(
    $A.getCallback(function(saveResult) {
        if(saveResult.state === "SUCCESS") {
            //DO SUCCESS
        } else {
            // DO NOTHING
        }
    })
);

CMP:

<force:recordData aura:id="recordHandler" 
    fields="{!v.fields}"
    targetRecord="{!v.record}" 
    targetFields="{!v.sObjectInstance}" 
    targetError="{!v.recordError}" 
    mode="EDIT"
    recordUpdated="{!c.handleDataService}" />

So on button click i'm creating the record using the saveRecord method of Data service, for some reason i'm getting the saveResult as null when component is executing from the mobile. But interesting thing here is the record is creating in the data base but callback is null

Is i'm missing anything here or this is how it behaves in the mobile???

Any workaround or solution is much appreciated. Thanks in advance.

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.