123
chenjingwu
2024-04-11 479014e115a970d9fcc738e7973bedb1a7b259a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import init from '@salesforce/apex/lexLastbuyProductController.initForCBLBPNew';
import { api, wire,LightningElement } from 'lwc';
 
export default class LexCBLBPNew extends LightningElement {
    @api recordId;
    name;
    IsLoading = true;
    connectedCallback(){
       init({
            recordId: this.recordId
       }).then(result=>{
            this.name = result.name;
            this.CBLBPNew();
       });
    }
    CBLBPNew(){
        var url = '/apex/StandardFieldDefaults?';
        var product = this.recordId;
        if (product != undefined && product != '') {
        url = url + 'SObjId=' + this.recordId + '&SObjName=' + this.name + '&linkId=00N10000009HD8q' + '&Pagefrom=Product';
        }
        url = url + '&Pageto=LastbuyProduct';
        window.open(url);
        this.closeAction();
    }
    closeAction(){
        window.open("/"+this.recordId,'_self');
    } 
}