buli
2023-05-04 d4a4ce824f3b2f3a335a3ad8e8c9efb3b37d630f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { LightningElement, wire } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
import getSingleAccountViaSOQL from '@salesforce/apex/RecordPagesController.getSingleAccountViaSOQL';
 
export default class SingleRecords extends NavigationMixin(LightningElement) {
    @wire(getSingleAccountViaSOQL) account;
 
    handleButtonClick() {
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.account.data.Id,
                objectApiName: 'Account',
                actionName: 'view'
            }
        });
    }
}