123
chenjingwu
2024-04-11 e3b88ea633581d0797f13de98a676a36c274bd50
force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-06-21 10:42:48
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-14 16:47:51
 * @LastEditTime: 2023-10-10 17:44:41
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -17,13 +17,22 @@
import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexUpdateToOpp extends LightningElement {
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        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());
        }
    }
    connectedCallback(){
        Promise.all([