Sub topic 10
Conversion Permissions and Lead Settings
This chapter covers who can convert a lead and which org-wide settings change what conversion does. It assumes you can navigate Setup and the Object Manager. It also assumes you know how profiles and permission sets grant object permissions, and that you have read the previous chapters on the conversion process and field mapping. The SOQL and Apex examples need only basic syntax knowledge.
Why conversion has its own permissions
Converting a lead is not a single edit. One action changes a lead and creates or updates up to three other records: an account, a contact, and optionally an opportunity. Salesforce therefore checks several permissions at once instead of one "can convert" switch. When a user reports "I can see the Convert button but conversion fails", the cause is almost always one missing permission from this list.
The permissions a user needs
A user needs the system permission Convert Leads, plus object permissions on every record type the conversion touches.
| Requirement | Where it is set | What it controls |
|---|---|---|
| Convert Leads | Profile or permission set, system permissions | Whether the user can run conversion at all |
| Read and Edit on Leads | Object settings | Conversion edits the lead, because it marks it converted |
| Create on Accounts | Object settings | Creating a new account (not needed if you attach to an existing one) |
| Create on Contacts | Object settings | Creating a new contact |
| Create on Opportunities | Object settings | Creating an opportunity (not needed if you skip it) |
| Access to existing records | Sharing model, role hierarchy, sharing rules | Choosing an existing account, contact, or opportunity to attach to |
Convert Leads is a user permission, not an object permission. It is not part of the Leads object settings, so reviewing only the Leads object permissions will not reveal it.
Permission set or profile
Grant Convert Leads through a permission set where you can. A profile is a poor place for a single capability, because many users share a profile and you cannot grant the permission to some of them without cloning it. A permission set called "Lead Converter" can be assigned to the people who qualify leads, such as sales development reps, without changing their base profile.
To find out who already has the permission, query the permission set fields. Profiles have their own permission set record, so this query covers both.
SELECT Id, Label, Profile.Name, IsOwnedByProfile
FROM PermissionSet
WHERE PermissionsConvertLeads = trueTo list the users who receive the permission through any assignment:
SELECT Assignee.Name, Assignee.Username, PermissionSet.Label
FROM PermissionSetAssignment
WHERE PermissionSet.PermissionsConvertLeads = true
ORDER BY Assignee.NameHow the checks combine
The diagram shows the order of the checks. The exact error messages differ, but the logic is the same.
Checking object access from Apex
If you build your own conversion screen or automation, you can test object access before calling Database.convertLead. The code below checks only the object permissions. It does not check the Convert Leads permission, so a user without that permission can still pass this check.
Boolean canCreateAccount = Schema.sObjectType.Account.isCreateable();
Boolean canCreateContact = Schema.sObjectType.Contact.isCreateable();
Boolean canCreateOpportunity = Schema.sObjectType.Opportunity.isCreateable();
Boolean canEditLead = Schema.sObjectType.Lead.isUpdateable();
System.debug('Account create: ' + canCreateAccount);
System.debug('Contact create: ' + canCreateContact);
System.debug('Opportunity create: ' + canCreateOpportunity);
System.debug('Lead edit: ' + canEditLead);Apex runs in system mode by default, so these checks matter only if you want the code to respect the running user's rights. A conversion run from Apex may succeed for a user who could not do it from the UI. Whether that is acceptable is a design decision, and you should make it deliberately.
Ownership and sharing during conversion
Conversion creates new records, so you must decide who owns them. By default, the new account, contact, and opportunity take the lead's owner. In the Lightning conversion window, the user can pick a different record owner.
Two points often cause trouble:
- Queue-owned leads. A queue cannot own the records that conversion creates. A lead sitting in a queue usually has to be taken by a user first, or you must pass an owner explicitly when converting from Apex with
setOwnerId. - Private sharing models. If the org-wide default for Account is Private, the converting user sees only accounts they own or that are shared with them. Duplicate matching and the "choose existing account" lookup respect that visibility. A user can therefore miss a match that exists, then create a duplicate.
Check the lookup's behavior with a user who has the real sharing access, not with an administrator who can see everything.
Lead settings in Setup
Open Setup and search for Lead Settings. The page holds several org-wide options. Names and layout vary a little between releases, so compare what you see with the list below.
Default lead owner and notifications
The Default Lead Owner is the user or queue that receives a lead when no assignment rule entry matches it. The option Notify Default Lead Owner sends an email when the default owner receives a lead that way. Set the default owner to a queue that a team watches, not to a person who may leave the company. Otherwise, unmatched leads quietly pile up under one user.
Default lead creator
For Web-to-Lead, a related setting names the user recorded as the creator of leads that arrive from the web form. It matters for audit trails and for reports that group by creator.
Require validation for converted leads
This setting changes what conversion enforces, and it is the one most likely to surprise you.
By default, conversion does not run the validation rules and required-field checks on the account, contact, and opportunity it creates. A required custom field on Opportunity, for example, does not block conversion when the lead has no value for it. Salesforce favors getting the conversion done. Apex triggers on those objects still fire.
If you turn on Require Validation for Converted Leads, conversion enforces validation rules, required fields, and Apex-based checks on the new records. A conversion that used to succeed can now fail with a validation error. The user then has to fix the data before converting.
| Setting state | Validation rules on new records | Required fields on new records | Typical result |
|---|---|---|---|
| Off (default) | Not enforced | Not enforced | Fast conversion, possible incomplete records |
| On | Enforced | Enforced | Cleaner data, more failed conversions |
Before enabling it in production, run a sample of recent leads through conversion in a sandbox. Look for validation rules that assume an opportunity exists, or that check fields the lead does not map to.
Conversion-related settings elsewhere
Several controls that shape conversion live outside the Lead Settings page.
- Converted status values. Setup, Object Manager, Lead, Fields & Relationships, Lead Status. At least one value must be marked as converted, or conversion cannot finish.
- Page layouts. The Convert button appears on the lead page layout. Removing it from a layout hides the button for users on that layout, but does not remove their permission.
- Field mapping. Setup, Object Manager, Lead, Fields & Relationships, Map Lead Fields. This was covered in the previous chapter.
- Record types. A converted account, contact, or opportunity gets a record type that the converting user can use. If that user's profile has no access to the intended record type, the record may land with a different default.
- Field-level security. Users who cannot see a field may not be able to carry its value into a mapped field. Test with the lowest-privilege user who converts leads.
Troubleshooting permission problems
| Symptom | Likely cause | Fix |
|---|---|---|
| No Convert button | Missing Convert Leads, or button removed from the layout | Assign the permission set, then check the page layout |
| Error about insufficient access when converting | Missing Create on Account, Contact, or Opportunity | Add the object permission to the profile or a permission set |
| Cannot find an existing account in the lookup | Sharing model hides it from the user | Review the role hierarchy and sharing rules |
| Conversion fails with a validation message | Require Validation for Converted Leads is on | Fix the data, or adjust the rule |
| Unmatched leads end up with an unexpected owner | Default Lead Owner is set to that user | Change the default owner to a monitored queue |
| Apex conversion works but the UI fails for the same lead | Apex ran in system mode, UI checks the user's rights | Compare against the user's permissions |
A good habit is to reproduce a problem with Login As a user with the same profile and permission sets, instead of reasoning from the admin view.
Design decisions
Think through these points before you change settings in a production org.
- Who converts? Limiting conversion to a small group keeps data quality high, but creates a bottleneck. Opening it to all sales users speeds things up and increases the risk of duplicates.
- Strict or lenient validation? Strict validation gives better records, but it can block users who have no way to supply the missing data at conversion time. If you turn it on, make sure the conversion window or the lead page can collect the values.
- Where do unmatched leads go? Pick a queue with an owner who checks it daily. An unwatched default owner is a hidden backlog.
Exercise
A sales rep reports that the Convert button is visible on a lead, but clicking through the conversion fails with an insufficient access error. The rep's profile has the Convert Leads permission and Edit on Leads. Name one more permission to check, and write a SOQL query that lists the users who currently have Convert Leads through any permission set or profile.
Show answer
Check Create on Opportunities (and also Create on Accounts and Contacts), because conversion fails if the user cannot create a record type that the conversion is set to create. The query is: SELECT Assignee.Name, Assignee.Username, PermissionSet.Label FROM PermissionSetAssignment WHERE PermissionSet.PermissionsConvertLeads = true ORDER BY Assignee.Name
Exercise
Your org has "Require Validation for Converted Leads" turned off. A validation rule on Opportunity requires the Next Step field, and leads convert without a value for it. What happens if you turn the setting on, and what should you do before enabling it in production?
Show answer
Conversions that create an opportunity without a Next Step value fail with a validation error, and Database.convertLead returns an unsuccessful result. Before enabling the setting, test a sample of real leads in a sandbox, and make sure users can enter the required values during conversion or that the rule excludes conversion cases.