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
Nidhi MeshramNidhi Meshram 

Create a Custom Button or Lightning Component for take ownership of that record?

Admin transfers the ownership to lead queue. In Queue there are 5 users, in which 1 users are ready to take ownership of that lead record, Need to create custom lightning button so that 1 users can assign themselves by clicking take ownership button, by clicking take ownership button change owner will be changed to that user name.
Neha AggrawalNeha Aggrawal
Hi Nidhi,

Your users (who are added to the queue) should be able to see the accept button when they change the list view to queue.
Let's say your queue name is testQ, when the admin assigns the leads to the queue, a view will be created for the lead records called testQ which will contain the leads assigned to the queue. Your users can click on Accept button on that list view and assign themseleves as the owner of the lead.
There should not be any customization needed here.

Hope this helps.
Thanks and Regards, 
Neha - Everything Salesforce (
Nidhi MeshramNidhi Meshram
Hi Neha,
Thanks for this update i got to know there is a accept button on both case and lead object. What about the custom object. I have one custom object Tickets as  I am the owner of the record and transfers the records to IT queue, I need to create a custom button (Take ownership) after assigning to the queue queue members need  to click that button through that owner name will be changed whoseover click that button. I am new to Lighning Component Need help on this .