Loading...

Managing Salesforce queues is typically restricted to system administrators, which often creates operational slowdowns for teams that need faster control over their assignments. When non-admin users must rely on admins for routine queue updates, productivity drops, and simple changes turn into avoidable delays.

In this blog, we’ll walk through a practical workaround to this limitation by building a secure, custom Salesforce application using Lightning Web Components (LWC), Apex, and Custom Metadata. This approach enables authorized non-admin users to add or remove queue members safely.

Prerequisite:

  • Salesforce Developer account with admin access.
  • Good hands-on Knowledge of JavaScript, HTML, LWC, Apex classes, permission sets, and metadata.

Below is the final interface of the application after implementation.

image1 2

Step 1: Create a Custom Metadata Type to Define Which Queues Non-Admin Users Can Manage

  • Create a metadata record for each non-admin user who can manage queues, using their email address. Each user should have one metadata record.
  • In the custom metadata, we will create three fields.
  1. userEmail – Email of that non-admin user who will manage queues 
  2. Queue List – Contains the names of the queues that this non-admin user can access.
  3. Queue User Role – Contains the role names that this non-admin user is allowed to access.
image2
image1
image6

Step 2: Create a Lightning Web Component to provide an interface for users to access this functionality.

In this step, we build the LWC that serves as the main user interface for queue management. This component will read the custom metadata to determine which queues a non-admin user can manage, retrieve the list of available members based on the allowed roles, and display everything in a clean, interactive layout. From the UI, users can view existing queue members, add new members, or remove existing ones with a single click.

The LWC will call an Apex controller to handle all server-side operations securely, ensuring that only authorized users, based on the metadata configuration, can modify queue membership. This component essentially becomes the bridge between Salesforce data and a simplified, user-friendly queue management experience.

  • Create an LWC with three files, queueManager.html, queueManager.js, and queueManager.js-meta.xml, along with an Apex controller class named QueueManagerService.cls. 
  • QueueManagerService.cls should be declared as without sharing so Salesforce can bypass object and field-level security checks, allowing non-admin users to manage queue members.
  • In this code, users already assigned to the queue should always appear at the top, sorted by name.
  • We will create a simple HTML file that includes a dropdown to select a queue, an option to choose the member type, a search bar for filtering members, and a list displaying the available members.
  • In the XML file, we should enable lightning__AppPage, lightning__RecordPage, lightning__HomePage, and lightning__Tab because these targets allow the component to be used across different areas of Salesforce, such as app pages, record pages, the home page, and custom tabs.

In the JavaScript file, we will handle all the UI logic, call the Apex methods, and perform the necessary actions required for this application.

Step 3: Create a new permission set to grant access to the Apex class and LWC, ensuring that only authorized non-admin users can manage queues.

  • The permission set should include all required permissions for the Apex class, the LWC, the custom tab, and the application.
image3

Watch the Demo

Conclusion:

By building this custom queue management application using LWC, Apex, and custom metadata, we extended Salesforce’s native capabilities and made queue administration accessible to non-admin users in a secure and controlled way. This solution removes unnecessary dependency on system administrators while still maintaining full governance through metadata and permission sets. 

With a simple and intuitive interface, users can now view, add, and remove queue members effortlessly. This implementation highlights the real value of tailored Salesforce development services, combining declarative tools with custom development to streamline operations, improve agility, and adapt Salesforce to real business needs.

No Data Found.

Related Articles
Dark Mode in Salesforce Enabling It and Creating Theme Ready Lightning Web Components with SLDS 2.0 1 1

With the Winter ’26 release, Salesforce introduced Dark Mode in Lightning Experience. Dark Mode has been introduced as a beta feature in Winter ’26, and at first it was available only for Starter Edition orgs. It is now rolling out further with Spring ’26 to Professional, Enterprise, and Developer editions. To use Dark Mode, Salesforce […]

Read More
How to Merge and Brand PDF Files in Salesforce Using LWC Visualforce PDF LIB 1

Salesforce developers frequently encounter document automation requirements that go beyond standard Apex-based PDF generation. From merging multiple ContentVersion files to dynamically applying branding like watermarks and headers, traditional server-side approaches often hit Salesforce heap size limits (6MB/12MB), creating performance and scalability challenges. This guide presents a heap-limit-safe PDF merging architecture in Salesforce using Lightning Web […]

Read More
Building a Reusable Popup Modal Architecture in Salesforce LWC 02 1

Modern Salesforce applications frequently rely on popup modals for confirmations, warnings, access control decisions, and destructive actions. However, building modal logic separately inside every Lightning Web Component often leads to duplicated code, inconsistent user experiences, and growing technical debt. This blog introduces a flexible popup modal architecture in Lightning Web Components (LWC) that centralizes modal […]

Read More
How to Add a Lookup Recipient in a Sign Template

This step-by-step guide will provide you with quick steps on how to add a lookup recipient inside a sign template in just a few easy steps. This process improves your eSignature for Salesforce workflow by pulling recipients directly from related records. Whether you rely on Salesforce digital signature features or any eSignature integration, adding lookup […]

Read More
Agentforce VS code

As Salesforce continues to move toward AI-assisted development, Agentforce is emerging as a powerful tool that helps developers interact with their org metadata, objects, and configurations using intelligent prompts. When combined with Visual Studio Code (VS Code) and the Salesforce CLI, Agentforce enables a faster, more context-aware way to explore and build on the Salesforce […]

Read More
How to Send Your First Document for eSignature

Sending documents digitally is now a core requirement for modern businesses. With eSignature for Salesforce and seamless eSignature integration, users can configure and send documents for signing directly from Salesforce, eliminating manual paperwork and speeding up approvals while keeping all data centralized and secure. In this guide, we will provide you with quick steps to […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203239658
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818