Creating a custom permission in Salesforce involves several steps. Custom permissions are used to control access to custom settings, custom metadata types, and Apex code. Here's a step-by-step guide on how to create a custom permission to Delete Message from the Salesforce:
1 - You have to log in to your Salesforce org with administrative privileges.
2 - Click on the "Gear icon" then Setup;
3 - Type "Custom Permission in the Find Box" > Click on "Custom Permission" (1), then click on New (2).
3.1 - Use the following Information:
4 - Then Save.
It is crucial that this Custom Permission is linked to a Permission Set or this will not work.
After creating you might want to know how to Assign the Custom Permission.
The result of this configuration after assigning it to the Permission Set and then adding that set to a user is the ability to see the recycle bin in the component.