123
chenjingwu
2024-04-19 5c79ed09628411b95f443ece77e63277e9752172
force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-12 10:46:24
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-20 17:28:12
 * @LastEditTime: 2023-10-10 17:39:53
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -39,15 +39,23 @@
        }
    }
    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());
      }
  }
    updateRecordView(recordId) {
      updateRecord({fields: { Id: recordId }});
    }