Skip to main content
2 of 4
added 694 characters in body
I. Simoes
  • 49
  • 1
  • 2
  • 11

Connecting Lightning Data Service to apex controler

I'm having trouble implementing a solution when using an action in the account context, calling a component that passes certain fields to an apex controller. The idea is to use Lightning data service.

This is the component I Have so far: <aura:component controller="CallInformaDBController" implements="flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader, force:hasRecordId"> <aura:attribute name="account" type="Object"/> <aura:attribute name="simpleAccount" type="Object"/> <aura:attribute name="accountError" type="String"/> <force:recordData aura:id="accountRecordLoader" recordId="{!v.recordId}" fields="Name,NIF__c" targetRecord="{!v.account}" targetFields="{!v.simpleAccount}" targetError="{!v.accountError}" recordUpdated="{!c.handleRecordUpdated}" />

</aura:component>

I. Simoes
  • 49
  • 1
  • 2
  • 11