binxie
2023-06-26 00e147ec892cb1e89d0698787a8c60da1014cdb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { LightningElement, track } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
 
export default class LexNewOrder extends NavigationMixin(LightningElement) {
    @track showSpinner = true;
 
    handleClick(event) {
        this.showSpinner = true;
        var rtId = event.target.id;
        // this.clickedButtonLabel = event.target.label;
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Consumable_order__c',
                actionName: 'new'
            },
            state: {
                useRecordTypeCheck: 1
            }
        });
        this.showSpinner = false;
    }
}