buli
2023-04-26 d6a096fadfe9c8f261f56a827cfceed663c36b8b
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
              }
        });
    }
    
}