• DBAgent Gatan
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
When running the below code I am receiving this error and I am not sure why?

 [LWC component's @wire target property or method threw an error during value provisioning. Original error:
[{(intermediate value)}.then is not a function]]


import { LightningElement, api, wire } from 'lwc';
import SubmitQuoteForApproval from '@salesforce/apex/lwcSubmitQuoteForApproval.SubmitForApproval';
const FIELDS = ['SBQQ__Quote__c.SBQQ__LineItemCount__c','SBQQ__Quote__c.Special_Lines_Roll_UP__c'];
import { getRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { CloseActionScreenEvent } from 'lightning/actions';

export default class lwcSubmitQuoteForApproval extends LightningElement {
        quote;
        @api recordId;
    
        @wire(getRecord, { recordId: '$recordId', fields: FIELDS })
        wiredRecord({error,data }) {
            if(data) {
                this.quote = data;
                if(this.quote.fields.SBQQ__LineItemCount__c == 0){
           
                    this.dispatchEvent(
                        new ShowToastEvent({
                                  title: 'Get Help',
                                  message: 'Salesforce documentation is available in the app.',
                                  variant: 'warning',
                                  mode: 'pester'
                              })
                     );
                }
    
                SubmitQuoteForApproval, ({idQuote:'$recordId' })
                    .then(result => {
                     //process success toast
                     showErrorToast() 
                     })
            }
        }
        closeAction(){
            this.dispatchEvent(new CloseActionScreenEvent());
          }
    }
   
   

I am working in enterprise edition. As winter 14 changed... i am unable to see the option reset security token . In devoloper edition it is visible. So from Enterprise edition i am unable to find.