Posts

Showing posts with the label Reset

Salesforce Fact #828 | Reset value of LWC record picker using lwc:ref

Image
In LWC, if there are multiple lightning record pickers present and suppose we need to set/reset the value of a particular one, we can make use of the lwc:ref option. Attached are the screenshots.

Salesforce Fact #794 | Reset value in LWC record picker

Image
We can use the clearSelection() method to reset the value in lightning-record-picker. Reference:  https://developer.salesforce.com/docs/component-library/bundle/lightning-record-picker/specification Attached is the screenshot.

Salesforce Fact #743 | Multiple reset passwords from screen flow

Image
We can create a screen flow for admin users to help them reset passwords for multiple users at once. Also, an invocable apex method is needed. Attached are the screenshots. Note: Each call to System.resetPassword() counts as 1 DML statement.

Salesforce Fact #653 | Reset value in combobox

Image
Suppose we have a scenario in LWC where we need to reset the value of the combobox on button click. We can achieve this using template.querySelector(). Attached are the screenshots.

Salesforce Fact #646 | Reset draftValues in lightning datatable

Image
In datatable there is a property named 'draftValues' which keeps a track of inline edits made. Now if we have a scenario, where we need revert the inline edits made so far, we can set the draftValues to empty array using bit of logic in JS. Attached are the screenshots.