You need to sign in to do that
Don't have an account?
Sarita Pa 3
Use Action on standard Object with out apex controller
Good Morning.
Would like to know if we can use Action attributes for standard objects.
What ever the documentation i see everywhere actions are being retrieved from custom controller only.
Example of what I am trying and what errors I am getting is b
Thanks for your help in advance
Would like to know if we can use Action attributes for standard objects.
What ever the documentation i see everywhere actions are being retrieved from custom controller only.
Example of what I am trying and what errors I am getting is b
<aura:component implements="force:lightningQuickAction,force:hasRecordId"> <aura:attribute name="record" type="Opportunity"/> (This is the standard Object) <aura:attribute name="simpleRecord" type="Object"/> <aura:attribute name="recordError" type="String"/> <force:recordData aura:id="record" recordId="{!v.recordId}" fields="AccountId" targetFields="{!v.simpleRecord}" targetError="{!v.recordError}" recordUpdated="{!c.handleRecordUpdated}" /> <h1> {!v.simpleRecord.AccountId} </h1> </aura:component> controller: ({ handleRecordUpdated: function (component, event) { var action = component.get("v.record"); (This is tied to the opportunity object) // Here is the issue what I am facing // when I try to set some parameters as action.setParams() --> Getting errors set params method is not defined. } })Please correct me if I am missing any thing and let me know if there is any example of using standard object with action attribute.
Thanks for your help in advance
https://developer.salesforce.com/docs/atlas.en-us.214.0.lightning.meta/lightning/data_service_save_record.htm
https://developer.salesforce.com/docs/atlas.en-us.214.0.lightning.meta/lightning/data_service_saverecordresult.htm
https://developer.salesforce.com/docs/atlas.en-us.214.0.lightning.meta/lightning/data_service_save_record.htm
https://trailhead.salesforce.com/en/modules/lightning_data_service/units/lightning_data_service_manipulate_records