• 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());
          }
    }
   
   
In order to overcome the limitation of not being able to remove a standard button from a page layout, I created a simple visualforce page, removed the real related list from the layout, then added it's "stand in" visual force replacement to the layout.
This works very well with one exception. I need the Approve/Reject Link to open in a new window, but it's opening inside of the iFrame.
I'm trying to append &isdtp=lt to the Approve/Reject link, but every method i've tried in an attempt to inject it has failed.
Any help would be greatly appreciated.

Thanks,
Josh
 
<apex:page standardcontroller="SBQQ__Quote__c">
    <apex:relatedlist list="ProcessSteps" title="Approval History">    
    </apex:relatedlist>
    
	<!-- ************************** Remove the submit button ************************** -->     
    <script src="/resource/1420757809000/jquery"></script>        
    <script>		
        $j = jQuery.noConflict();        
    
    $j(document).ready(function(){$j("input[name='piSubmit']").hide();});                
    
    </script>
</apex:page>



 
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.

  • December 16, 2013
  • Like
  • 2