Posts

Showing posts with the label Lead

Salesforce Fact #923 | Find out matching leads/contacts using screen action

Image
Another use case using Screen flow action(Beta). We can have a screen flow to take email Id as input and find out what all existing contacts and leads are present with the same email. For this, we create a subflow to fetch the contacts and leads based on the input email passed. Also, to avoid unnecessary fetching of records, we can add validation to ensure the get records are performed only when the email is of valid email format. And in the main flow, we can refer the subflow in screen action and show the matching contacts or leads instantly. Attached are the screenshots.

Salesforce Fact #903 | Check Lead coversion access in LWC

Image
How to check if the current user has access to convert lead or view and edit converted leads in LWC. User permission checks to the rescue. We can use the two user permissions: ConvertLeads and AllowViewEditConvertedLeads to check the same. Reference:  https://www.sfdcamplified.com/challenge-map-between-salesforce-permissionname-and-label/ Attached is the screenshot.

Salesforce Fact #902 | Setting record owner during lead conversion

If a Lead is owned by a Queue, then during lead conversion we need to set the ownerId to any user who will be the owner of the converted account and contact record. So while converting lead from apex code we need to set the owner id else the below error is encountered: System.DmlException: ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: [OwnerId]

Salesforce Fact #829 | Lead and Contact intelligent views

Intelligence views are available for Leads and Contacts in Sales cloud. It is a one stop place for all the engagement activity and insights of the records. In order to enable it, go to Setup -> Lead Intelligence View Setup / Contact Intelligence View Setup -> Turn the setting on -> Add the Intelligence View Button in the list view button layout. Reference:  https://help.salesforce.com/s/articleView?id=sf.leads_intelligence_view.htm&type=5    https://help.salesforce.com/s/articleView?id=sf.contacts_intelligence_view.htm&type=5

Salesforce Fact #796 | Lead already converted

If we try to convert an already converted lead by mistake, we encounter the error 'CANNOT_UPDATE_CONVERTED_LEAD'. It shows the date as well on which the lead was converted. Reference:  https://help.salesforce.com/s/articleView?id=000384333&type=1

Salesforce Fact #765 | Assigning leads to territory using data load

Image
We can now assign Leads to territories. The same can be done using data load as well. For this, we need to import records in the ObjectTerritory2Association object and specify the Lead record Id in ObjectId field. Note: If you are using DataLoader and encounter an error 'Invalid Id', please update it to the latest version. Reference:  https://forceforfun.com/2022/10/25/update-dataloader-to-take-advantage-of-assigning-leads-to-territories/ Attached are the screenshots.

Salesforce Fact #622 | Public Read/Write/Transfer

Public Read/Write/Transfer OWD setting is only available for Case and Lead objects. It allows all users to view, edit, transfer and report on all records. Reference:  https://help.salesforce.com/s/articleView?id=sf.sharing_model_fields.htm&type=5

Salesforce Fact #592 | Assign Leads to territories

Now Leads can also be assigned to territories. To enable the setting, go to Setup -> Territory Settings -> select the checkbox 'Enable Leads'. Once the setting is enabled, the corresponding access level can be chosen. The Assigned territories related list gets available to be added in the Lead page layout. The territory assignments are tracked in same ObjectTerritory2Association object. Reference:  https://help.salesforce.com/s/articleView?id=sf.tm2_assign_territories_manually.htm&type=5    

Salesforce Fact #540 | Creating task for a lead record

Do you know while creating a task associated to a lead record it is not possible to select any other record in the 'Related To' field. Attempting to do so generates the error: ' You can’t relate an account, opportunity, or other object to a task already related to a lead. ' Reference:  https://help.salesforce.com/s/articleView?id=000388265&type=1