zhangchunxu
2023-07-21 9cf6073e08e6c398de348b5856ce1265753a7567
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { LightningElement, track } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
 
export default class NewOrderButton extends NavigationMixin(LightningElement) {
    
    // clickedButtonLabel;
 
 
    handleClick(event) {
        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
              }
        });
    }
    
}