19626
2023-10-09 25f056535350a0b80bad50d2cc45311998e5d1cd
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
@@ -8,6 +8,8 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import getUserIdByName from '@salesforce/apex/ReportController.getUserIdByName';
import getProfileIdByName from '@salesforce/apex/ReportController.getProfileIdByName';
import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexVOCCheck extends LightningElement {
    
    @api recordId;
@@ -39,6 +41,9 @@
    connectedCallback(){
        Promise.all([
            loadStyle(this, lwcCSS)
           ]);
        console.log(this.recordId);
        init({
            recordId: this.recordId
@@ -68,14 +73,15 @@
        updateRecord({fields: { Id: recordId }});
    }
    showToast(msg, type) {
    showToast(msg,type) {
        const event = new ShowToastEvent({
          title: "",
          message: msg,
          variant: type
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
      }
    }
    getUserId(userName){
        getUserIdByName({
            name : userName