buli
2023-04-20 f0bccccbb88d93ac05010c17d4b2e0cb22a2ce9a
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'
            }
        });
    }
}