tt
twysparks
2023-05-18 f3691832d9b0f4797a7249623193f495d74042ce
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'
            }
        });
    }
}