function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dipesh Patel 43Dipesh Patel 43 

lightning component - custom button to update records

Hi,

I am trying to move custom component (on click javascript button) from classic to lightning. The current classic button exceute by
1, query [Select Id, custom_field__c from casechildline__c Where caseparentId__c =: varibableId AND custom_field__c = NULL];
2, set custom_field__c = 'Some value'; for return records
3, update return records

How to achieve through lightning components? Any sample code.

Thanks in advanced!
GarryPGarryP
you need LDS https://trailhead.salesforce.com/en/content/learn/modules/lightning_data_service/lightning_data_service_manipulate_records
Dipesh Patel 43Dipesh Patel 43
Hi Garry,

I am not sure on LDS 'lightning:recordEditForm' because on my case current javascript button run on the background once it's pressed => set the value and upate record automaticly.

Any other workaround?