123
chenjingwu
2024-04-11 df4601a9026b57f78c0b1b6619e366525d13f9fc
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-23 10:09:31
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-14 16:40:55
 * @LastEditTime: 2023-10-10 17:39:34
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -94,14 +94,22 @@
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
        if(type == 'success'){
            const event = new ShowToastEvent({
                message: msg,
                variant: type,
            });
            this.dispatchEvent(event);
            this.dispatchEvent(new CloseActionScreenEvent());
        }else{
            const event = new ShowToastEvent({
                message: msg,
                variant: type,
                mode: 'sticky'
            });
            this.dispatchEvent(event);
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});