force-app/main/default/lwc/dataDictionaryUtility/dataDictionaryUtility.js
//used to track old batch id
used to track old batch id
used to track old batch id
handleDataObjectClick() {
        submitDataObjectBatch().then(result => {
            this.newObjectId = result;
            if(this.newObjectId != this.oldObjectId){
            this.oldObjectId = result;
            this.toast.message = 'Data Object Batch has started';
            this.toast.variant = 'success';
            this.showToast(this.toast);
            }else{
                this.toast.message = 'Data Object Batch has not started try again in a little while or refresh the page';
                this.toast.variant = 'warning';
                this.showToast(this.toast);
            }
        }).catch( error => {
                this.toast.message = `An error occured: ${error}`;
                this.toast.variant = 'error';
                this.showToast(this.toast);
            });
    }
handleDataObjectClick ( ) { submitDataObjectBatch ( ) . then ( result => { this . newObjectId = result ; if ( this . newObjectId != this . oldObjectId ) { this . oldObjectId = result ; this . toast . message = 'Data Object Batch has started' ; this . toast . variant = 'success' ; this . showToast ( this . toast ) ; } else { this . toast . message = 'Data Object Batch has not started try again in a little while or refresh the page' ; this . toast . variant = 'warning' ; this . showToast ( this . toast ) ; } } ) . catch ( error => { this . toast . message = ` ${ error } ` ; this . toast . variant = 'error' ; this . showToast ( this . toast ) ; } ) ; }
used to track old batch id
used to track old batch id