How to show Error Message in Lightning Web Component Quick Action in Salesforce?

Sample code:
 
HTML:
<template>
    
</template>

JavaScript:
import { LightningElement, api, wire } from 'lwc';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { getRecord } from 'lightning/uiRecordApi';

const FIELDS = [ 'Account.Type' ];

export default class AccountQuickAction extends LightningElement {

    @api recordId;
    type;

    @wire( getRecord, { recordId: '$recordId', fields: FIELDS } )
    wiredRecord({ error, data }) {

        if ( error ) {

            let message = 'Unknown error';
            if (Array.isArray(error.body)) {
                message = error.body.map(e => e.message).join(', ');
            } else if (typeof error.body.message === 'string') {
                message = error.body.message;
            }
            this.dispatchEvent(
                new ShowToastEvent({
                    title: 'Error loading Account',
                    message,
                    variant: 'error',
                }),
            );

        } else if ( data ) {

            console.log( 'Account is ' + JSON.stringify( data ) );
            this.type = data.fields.Type.value;

        }
    }

    @api invoke() {

        console.log( "Inside Invoke Method" );
        console.log( "Record Id is " + this.recordId );

        if ( this.type == 'Prospect' ) {

            this.dispatchEvent(
                new ShowToastEvent({
                    title: 'Account Update Issue',
                    message: 'You cannot update Prospect Account',
                    variant: 'error'
                }),
            );

        }
        

    }

}
 
 
JS-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordAction</target>
        <target>lightning__RecordPage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordAction">
            <actionType>Action</actionType>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

 
Output:
 

Salesforce Internship Opportunities

 https://www.salesforce.com/company/careers/university-recruiting/summer-internship/

https://www.glassdoor.ca/Jobs/Salesforce-internship-Jobs-EI_IE11159.0,10_KO11,21.htm

https://www.accenture.com/us-en/careers/local/students

https://www.ziprecruiter.com/Jobs/Salesforce-Intern

https://www.simplyhired.com/search?q=salesforce+intern

How to Send Email to Contact and relate it to Case via Salesforce REST API?

Enable "Email-To-Case".


Path:
/services/data/v53.0/sobjects/Case/quickActions/SendEmail
 
HTTP Method:
POST

Body:
{    
    "contextId": "5008c00001Ejue0AAB"
    "record": {
        "HtmlBody": "<div+style=\"font-family:+Arial;+font-size:+14px;\">Test</div>",
        "Subject": "InfallibleTechie",
        "ToIds": ["0038c00002bkSPZAA2"]
    }
}
 
Example:
 


Output:
 
 

How to send Email via REST API in Salesforce?

Path:
/services/data/v53.0/actions/standard/emailSimple
 
HTTP Method:
POST

Body:
{
  "inputs" : [
    {
      "emailBody" : "Email body",
      "emailAddresses" : "email addresses separated by coma(',')",
      "emailSubject" : "Subject",
      "senderType" : "CurrentUser"
    }
  ]
}

Reference Link:
 
Example:
 

Output:
 
 

How to Embed/Display/Show Youtube Video in Salesforce Knowledge?

 Use the following steps to Embed Videos into a Knowledge Article.
 
1. Create a Rich Text Area field.


2. When creating the Article record, in the Rich Text Area field, use Source to enter HTML code. Use the sample code.

Check the following Video<br />
<br />
<iframe allowfullscreen="true" height="300" src="https://www.youtube.com/embed/di6iwHhrH6s" width="500"></iframe>
 
 
Output:

How to find the fields that are part of the Page Layout in Salesforce?

Sample Code:
 
List < Metadata.Metadata > layouts = Metadata.Operations.retrieve(
    Metadata.MetadataType.Layout, new List < String > { 'Account-Account Layout' }
);
Metadata.Layout layout = ( Metadata.Layout )layouts.get( 0 );
for ( Metadata.LayoutSection layoutSection : layout.layoutSections ) {
    
    for ( Metadata.LayoutColumn layoutColumn : layoutSection.layoutColumns ) {
        
        if ( layoutColumn.layoutItems != null ) {
            
            for ( Metadata.LayoutItem layoutItem : layoutColumn.layoutItems ) {
                
                if ( layoutItem.field != null ) {
                    
                    System.debug( 'Field is ' + layoutItem.field );
                    
                }
                
            }
            
        }
        
    }
    
}

In the above code, Account-Account Layout is Object Name hyphen Page Layout Name.
 
Output:
 

How to disable MFA in Salesforce?

If you are looking for disconnecting or revoking MFA for just a single user, then check the following link.
 
If you are looking for disabling MFA for multiple users part of a profile or permission set, then check the following steps: 
 
1. In the Profile or Permission Set, Disable "Multi-Factor Authentication for API Logins" and "Multi-Factor Authentication for User Interface Logins".


2. In the Profile or Permission Set, set "Session Security Level Required at Login" to None.


How to find users with API Enabled Permissions(API Only Users) in Salesforce?

"PermissionsApiEnabled" is used to grant API Enabled Permission to the user via Profile or Permission Set. Following SOQLs can be used to find users with API Enabled Permissions(API Only Users) in Salesforce.
 
Profile:
SELECT Id, Name FROM User WHERE ProfileId IN ( SELECT Id FROM Profile WHERE PermissionsApiEnabled = true )

Based on Permission Set:
SELECT AssigneeId, Assignee.Name FROM PermissionSetAssignment WHERE PermissionSet.PermissionsApiEnabled = true

How to create a Tab during Object creation in Salesforce?

While Creating the object, select "Launch New Custom Tab Wizard after saving this custom object". If this is enabled, after clicking Save button, it launches the Tab Wizard to create tab for the new object.


How to Query/SOQL Field Dependency for an Object in Salesforce?

Sample Field Dependency:
 

SOQL:
SELECT Label, QualifiedApiName, DataType, ControllingFieldDefinition.DeveloperName
FROM FieldDefinition
WHERE EntityDefinition.QualifiedApiName = 'Employee__c' AND ControllingFieldDefinitionId != null

 
Output:
 

How to share a Report Folder to all the Internal Users in Salesforce?

1. Click Share on the Report Folder.

2. Select Public Groups in Share With.

3. Select "All Internal Users".


Salesforce Certification Retake Policy

We can attempt Salesforce Certification 3 times in a particular release. Every year, we have 3 release cycles from Salesforce. So, we can attempt 9 times per year.

To know about releases, check the following link
 
Salesforce resets the retake count end of every release. 
 
For the 1st retake(after 1st attempt), we have to wait for 1 day(24 hours) to register.
For the 2nd retake, we have to wait for 14 days. 
For the 3rd retake, we have to wait for the next release as you have surpassed the 3 attempts already.

Reference Article:

Exception/Error Handling in Salesforce Batch Apex

Batch Apex classes can fire platform events when encountering an error or exception. Event records provide more granular tracking of errors than the Apex Jobs UI because they include the record IDs being processed, exception type, exception message, and stack trace. You can also incorporate custom handling and retry logic for failures. Clients listening on an event can tell how often it failed, which records were in scope at the time of failure, and other exception details. Events are also fired for Salesforce Platform internal errors and other “uncatchable” Apex exceptions like LimitExceptions that are caused by reaching governor limits.

If the start, execute, or finish method of a batch Apex job encounters an unhandled exception, a BatchApexErrorEvent platform event is fired. To fire a platform event, a batch Apex class declaration must implement the Database.RaisesPlatformEvents interface. 

Salesforce Reference Article:
https://help.salesforce.com/s/articleView?id=000340132&type=1
 
Error Log custom object:
 

Sample Code:
Batch class:
global class BatchAccountUpdate implements Database.Batchable<sObject>, Database.RaisesPlatformEvents {
 
    global Database.QueryLocator start( Database.BatchableContext BC ) {
 
        String query = 'SELECT Id,Name FROM Account';
        return Database.getQueryLocator( query );
 
    }
   
    global void execute( Database.BatchableContext BC, List< Account > scope ) {
 
         for ( Account a : scope ) {
         
             a.Name = null;    
             
         }
         update scope;
 
    }   
    
    global void finish( Database.BatchableContext BC ) {
    }
 
}

Trigger on BatchApexErrorEvent:
trigger BatchApexErrorEventTrigger on BatchApexErrorEvent (after insert) {
    
    List < Error_Log__c > errorLogs = new List < Error_Log__c >();
    
    for(BatchApexErrorEvent evt:Trigger.new) {
        
        Error_Log__c objErrorLog = new Error_Log__c(
            Record_Ids__c = evt.JobScope,
            Error_Message__c = evt.Message,
            Job_Id__c = evt.AsyncApexJobId
        );
        errorLogs.add( objErrorLog );
        
    }
    
    if ( errorLogs.size() > 0 ) {
        
        insert errorLogs;
        
    }

}

Sample Error Log: 
 
 

You do not have access to the Apex class named Exception in Salesforce

1. Check the user's profile. Make sure the Apex Class is added to the "Enabled Apex Class Access".


2. Make sure the user has "API enabled" permission in the profile if they are trying to access REST API Apex Class.

Salesforce Pricing

Salesforce Pricing depends on the Product and Features we choose.

1. First choose the right cloud.
a. Sales Cloud
b. Service Cloud
c. Marketing Cloud
d. Experience Cloud
e. Commerce Cloud(B2B/B2C)

2. Learn about Editions for Sales and Service Clouds as they provide different features. Based on the Edition we choose, the price varies.

Note:
a. Price and Usage Limits(Storage, API Calls, etc) are based on number of licenses(Users). So, always have a buffer.
b. There are Add-Ons available for additional cost.

How to Query ActivityHistory for a record in Salesforce?

Sample SOQL:
SELECT Id, Name, ( SELECT Id, Subject, Status FROM ActivityHistories )
FROM Account WHERE Id = '0018c000026ZmPmAAK' 

Output:
 

How to logout or disconnect user credentials in VS Code for Salesforce?

Use SFDX Command to logout or disconnect user credentials in VS Code for Salesforce.
 
Syntax:
sfdx auth:logout --targetusername my-hub-org
 
Example:
sfdx auth:logout --targetusername magtraining
 

Output: 


How to Freeze Row or Column in Quip?


To Freeze Row or Column in Quip, follow the below steps.

1. Right Click the cell.

2. Select Freeze/Unfreeze.


Video Reference:

Freeze and Unfreeze a Column in Quip x
Freeze and Unfreeze a Column in Quip

How to close Screen Quick Action using a Button in Salesforce Lightning Web Component(LWC)?

Sample Code:
HTML:
<template>
    <lightning-quick-action-panel header="My action">
        Testing<br/><br/>
        <lightning-button variant="brand" label="Close" onclick={closeQuickAction}></lightning-button>
    </lightning-quick-action-panel>
</template>


JavaScript:
import { LightningElement, api } from 'lwc';
import { CloseActionScreenEvent } from 'lightning/actions';

export default class ScreenQuickAction extends LightningElement {

    @api recordId;

    closeQuickAction() {
        
        console.log( "Record Id is " + this.recordId );
        this.dispatchEvent( new CloseActionScreenEvent() );

    }

    connectedCallback() {

        console.log( "Inside connectedCallback Method" );

    }

}


js-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordAction</target>
        <target>lightning__RecordPage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordAction">
            <actionType>ScreenAction</actionType>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

 
Output:
 

How to Query/Fetch all accounts which are associated with a particular email id in Contacts to Multiple Accounts Relationship?

Sample Contact Record:
 
 
SOQL:
SELECT Id, AccountId, Account.Name FROM AccountContactRelation WHERE ContactId IN (
SELECT Id FROM Contact WHERE Email = '[email protected]' )

 
Output:
 

How to show DateTime in Visualforce page for current and last year in Salesforce?

Sample Code:
Visualforce Page:

<apex:page controller="SamplePageController">  
    Current Year Datetime is {!currentYearDT}<br/><br/>
    Last Year Datetime is {!lastYearDT}  
</apex:page>  

Apex Class:
public class SamplePageController {
    
    public DateTime currentYearDT { get; set; }
    public DateTime lastYearDT { get; set; }
    
    public SamplePageController() {
        
        currentYearDT = System.now();
        lastYearDT = currentYearDT.addMonths( -12 );
        
    }

}


Output:

How to find users with Service Cloud User check box checked or enabled in Salesforce?

Sample SOQL:
SELECT Id, Name FROM User
WHERE UserPermissionsSupportUser = true

 
Output:
 

 

OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again. Exception in Salesforce

To resolve the "OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again." Exception in Salesforce, please check the following steps.

1. Set Relax IP restrictions in the Connected App and check whether it is because of IP Restrictions.

2. The issue might be due to Scope parameter also. So, adjust it and check.

Note:
For each and every change, Log out, clear Cache and try again.

How to pass Report filter parameter value from Lightning Web Component in Salesforce?

In order to pass pass report filter value in the URL, we have to use fv0, fv1....fvn based the filters used in the report. In the Lightning Web Component state attribute should be used along with Lightning Navigation to pass it. Please check the following code for reference.

Sample Code:
HTML:
<template>
    <lightning-card>
        <lightning-button
            label="View Report"
            onclick={viewReport}></lightning-button>
    </lightning-card>
</template>


JavaScript:
import { LightningElement } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';

export default class ReportNavigation extends NavigationMixin( LightningElement ) {

    viewReport( event ) {
        
        this[ NavigationMixin.Navigate ]({
            type: 'standard__recordPage',
            attributes: {
                recordId: '00O8c000007uh5UEAQ',
                objectApiName: 'Report',
                actionName: 'view'
            },
            state: {
                fv0: 'No'
            }
        });

    }

}


JS-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
    </targets>
</LightningComponentBundle>
 
Output:
 

 

How to create Formula field based on Multiselect Picklist in Salesforce?

In the Formula Field, INCLUDES() can be used to check whether the Multi Picklist Field has a specific value.
 
Sample Formula Field:
 
 
Output:
 
 

Transaction Finalizers in Salesforce Queueable Interface

The Transaction Finalizers feature enables you to attach actions, using the System.Finalizer interface, to asynchronous Apex jobs that use the Queueable framework. A specific use case is to design recovery actions when a Queueable job fails.

Sample Use Cases:
1. Retry in FinalizerContext if the queueable job fails
2. Add error log record in FinalizerContext to report on failures

Sample Class:
public class SampleClass implements Finalizer, Queueable {

    public void execute( QueueableContext ctx ) {
    }

    public void execute( FinalizerContext ctx ) {
    
        String parentJobId = '' + ctx.getAsyncApexJobId();    

        if ( ctx.getResult() == ParentJobResult.SUCCESS) {
        
            System.debug('Parent queueable job [' + parentJobId + '] completed successfully.');
            
        } else {
        
            System.debug( 'Parent queueable job [' + parentJobId + '] failed due to unhandled exception: ' + ctx.getException().getMessage() );            
            
        }
        
    }
    
}
 
To pass data through variable to the Finalizer, check the following:

"Unable to enqueue AsyncApexJob for finalizer: Attached Queueable job has hit the maximum retry limit of 5." Exception in Salesforce

If you are using Finalizer in the Queueable job, this exception is thrown when the retry limit exceeds more than 5.

For Developer Edition and Trial organizations, the maximum stack depth for chained jobs is 5, which means that you can chain jobs four times and the maximum number of jobs in the chain is 5, including the initial parent queueable job.
https://developer.salesforce.com/docs/atlas.en-us.232.0.apexcode.meta/apexcode/apex_queueing_jobs.htm

How to find Contact based on Phone Number instead of Email in Salesforce Embedded Service Deployment?

Use the following code in the Code Snippet. doFind and isExactMatch are set to false for Email, First Name and Last Name. But, doCreate is set to true for Email, First Name and Last Name because when the contact record is created, it will have the values passed from these fields. When the Chat is initiated, the contact is searched based on Phone number. If a matching Contact record is found, it will link it to the matched Contact record. Else, it will create a new Contact with the Last Name, First Name, Email and Phone Number entered.

Phone Field in Pre-Chat:
 
 
Sample Code:

        embedded_svc.settings.extraPrechatInfo = [ {
            "entityFieldMaps": [ {
                "doCreate": true,
                "doFind": true,
                "fieldName": "Phone",
                "isExactMatch": false,
                "label": "Phone"
                }, {
                "isExactMatch":false,
                "fieldName":"FirstName",
                "doCreate":true,
                "doFind":false,
                "label":"First Name"
                }, {
                "isExactMatch":false,
                "fieldName":"LastName",
                "doCreate":true,
                "doFind":false,
                "label":"Last Name"
                }, {
                "doCreate": true,
                "doFind": false,
                "fieldName": "Email",
                "isExactMatch": false,
                "label": "Email"
            } ],
            "entityName": "Contact"
        }];

How to display Number field with decimal values in lightning-datatable in Salesforce Lightning Web Component(LWC)?

Sample Decimal Field:
 
 
Sample Code:
 
Apex Class:
public with sharing class OpportunityController {
    
    @AuraEnabled( cacheable = true )
    public static List < Opportunity > fetchOpptys(){
        
        return [
            SELECT Id, Name, AccountId, Account.Name, Decimal__c
            FROM Opportunity LIMIT 10
        ];
        

    }
}


Lightning Web Component:
HTML:
<template>  
    <lightning-card title="Opportunities" icon-name="custom:custom63">  
        <div class="slds-m-around_medium">  
            <template if:true={availableOpportunities}>      
                <lightning-datatable
                    key-field="Id"
                    data={availableOpportunities}
                    columns={columns}
                    hide-checkbox-column="true"
                    show-row-number-column="true">
                </lightning-datatable>  
            </template>      
            <template if:true={error}>  
                {error}>                  
            </template>  
        </div>  
    </lightning-card>
</template>

JavaScript:
import { LightningElement, wire } from 'lwc';
import fetchOpptys from '@salesforce/apex/OpportunityController.fetchOpptys';
 
const columns = [
    { label: 'Name', fieldName: 'Name' },
    { label: 'Decimal', fieldName: 'Decimal__c', type: 'number',
    typeAttributes: { maximumFractionDigits: '2' } },
    { label: 'Account Name', fieldName: 'AccountURL', type: 'url',
    typeAttributes: { label: { fieldName: 'AccountName' }, target: '_blank'} }
];

export default class DataTable extends LightningElement {
     
    availableOpportunities;
    error;
    columns = columns;

    @wire( fetchOpptys )  
    wiredAccount( { error, data } ) {

        if ( data ) {

            let tempRecs = [];
            console.log( 'Fetched Data - ' + JSON.stringify( data ) );
            data.forEach( ( record ) => {

                let tempRec = Object.assign( {}, record );  

                if ( tempRec.AccountId ) {

                    tempRec.AccountName = tempRec.Account.Name;
                    tempRec.AccountURL = '/' + tempRec.AccountId;

                }
                
                tempRecs.push( tempRec );
                
            });
            this.availableOpportunities = tempRecs;
            this.error = undefined;

        } else if ( error ) {

            this.error = error;
            this.availableOpportunities = undefined;

        }

    }

}

JS-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
    </targets>
</LightningComponentBundle>


Output:


How to display Currency field with decimal values in lightning-datatable in Salesforce Lightning Web Component(LWC)?

Sample code:
Apex Class:
public with sharing class OpportunityController {
    
    @AuraEnabled( cacheable = true )
    public static List < Opportunity > fetchOpptys(){
        
        return [
            SELECT Id, Name, AccountId, Account.Name, Amount
            FROM Opportunity LIMIT 10
        ];
        

    }
}



Lightning Web Component:
HTML:
<template>  
    <lightning-card title="Opportunities" icon-name="custom:custom63">  
        <div class="slds-m-around_medium">  
            <template if:true={availableOpportunities}>      
                <lightning-datatable
                    key-field="Id"
                    data={availableOpportunities}
                    columns={columns}
                    hide-checkbox-column="true"
                    show-row-number-column="true">
                </lightning-datatable>  
            </template>      
            <template if:true={error}>  
                {error}>                  
            </template>  
        </div>  
    </lightning-card>
</template>

JavaScript:
import { LightningElement, wire } from 'lwc';
import fetchOpptys from '@salesforce/apex/OpportunityController.fetchOpptys';
 
const columns = [
    { label: 'Name', fieldName: 'Name' },
    { label: 'Amount', fieldName: 'Amount', type: 'currency',
    typeAttributes: { maximumFractionDigits: '2' } },
    { label: 'Account Name', fieldName: 'AccountURL', type: 'url',
    typeAttributes: { label: { fieldName: 'AccountName' }, target: '_blank'} }
];

export default class DataTable extends LightningElement {
     
    availableOpportunities;
    error;
    columns = columns;

    @wire( fetchOpptys )  
    wiredAccount( { error, data } ) {

        if ( data ) {

            let tempRecs = [];
            console.log( 'Fetched Data - ' + JSON.stringify( data ) );
            data.forEach( ( record ) => {

                let tempRec = Object.assign( {}, record );  

                if ( tempRec.AccountId ) {

                    tempRec.AccountName = tempRec.Account.Name;
                    tempRec.AccountURL = '/' + tempRec.AccountId;

                }
                
                tempRecs.push( tempRec );
                
            });
            this.availableOpportunities = tempRecs;
            this.error = undefined;

        } else if ( error ) {

            this.error = error;
            this.availableOpportunities = undefined;

        }

    }

}

JS-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
    </targets>
</LightningComponentBundle>

 
Output:


Note:
currencyCode: 'EUR' can also be used in the typeAttributes to display in European Currency. If currencyCode is not defined, it will take the running user's Locale.

How to navigate to report from Lightning Web Component(LWC) in Salesforce?

Sample Code:
 
HTML:
<template>
    <lightning-card>
        <lightning-button
            label="View Report"
            onclick={viewReport}></lightning-button>
    </lightning-card>
</template>

JavaScript:
import { LightningElement } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';

export default class ReportNavigation extends NavigationMixin( LightningElement ) {

    viewReport( event ) {
        
        this[ NavigationMixin.Navigate ]({
            type: 'standard__recordPage',
            attributes: {
                recordId: '00O8c000007uh5UEAQ',
                objectApiName: 'Report',
                actionName: 'view'
            }
        });

    }

}

JS-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
    </targets>
</LightningComponentBundle>

 
Output:
 
 

How to Run flow as another user in Salesforce?

1. Go to Process Automation Settings.


2. Enable "Let admins debug flows as other users".



3. Click Debug on the Flow.

4. Select "Run flow as another user" and select the user to run as.


How to find Chats that are transferred from the BOT to the agents and successfully handled in Salesforce?

Sample SOQL:
SELECT COUNT( LiveChatTranscriptId )
FROM LiveChatTranscriptEvent
WHERE Type = 'TransferredToButton' AND LiveChatTranscript.Status = 'Completed'
AND CreatedDate = LAST_N_DAYS:7

Output:
 

How to find Account records that didn't had any closed tasks or events in the last 7 days in Salesforce?

Last Activity
The date when a User last did something related to the record (represents one of the following):

1. The latest Due Date of the Closed Tasks on a record.
2. The latest Date of Events on a record.
 
1. Create a Report.

2. Add Last Activity as the filter with LAST 7 DAYS.
 
 
Output:
 

Report on Users using Salesforce Authenticator App


1. Create a Report.

2. Select "Identity Verification Methods" as the Report Type.


3. In the Filter, set "Salesforce Authenticator" to true.