• Lindsey Colvin2
  • NEWBIE
  • 10 Points
  • Member since 2016
  • Level 2 Salesforce Developer


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I'm in need of some help.  I'm writing a trigger on Quote Line Item with intent to call a class to fire (the class will sync the line items back to the Opportunity) any time there is an after update on a Quote Line Item where the Quote's Primary_Quote__c checkbox == true.  Here is the code that I have currently.  It appears according to the debug that it is not returning the QLI ids.  Can someone please help steer me in the right direction?
 
trigger QuoteLineItem_Trigger on QuoteLineItem (after Update)
{

      ApexPages.StandardController stdController;
      public string currentRecordId {get; set;}
      set<id> quoteIds = new set<id>();
      
      if(trigger.isAfter && trigger.isUpdate) {
         system.debug('%%%%%%%%%%% Entering the After Update on Quote');

      for(QuoteLineItem QLI : trigger.new){
         if( QLI.Quote!=NULL && QLI.Quote.Primary_Quote__c == true ) {
         system.debug('%%%%%%%%%%% Not finding the right Quote');
         
         ApexPages.StandardController controller = new ApexPages.StandardController(QLI.Quote);
         system.debug('%%%%%%%%%%% +controller');
         vlocity_cmt.LineItemManagementController stdcontroller = new vlocity_cmt.LineItemManagementController(controller);
         stdcontroller.doSynchToQuote();
         system.debug('%%%%%%%%%%% This is not syncing');
    
         }                 
      }
   }
}

Any help is appreciated!  
Hi,

I am fairly new to developing classes and pages, and need assistance in getting a test class to work for this controller extension.  Your help is appreciated!

Controller:

public with sharing class OpportunityControllerExtension {

    private final Opportunity opp;
    
        public OpportunityControllerExtension(ApexPages.StandardController stdController)  {
            this.opp = (Opportunity) stdController.getRecord();
            
       }
       
    public PageReference Dismiss()  {
    
        opp.Display_Alert__c = false;
        update opp;
        
            PageReference pageRef = ApexPages.currentPage();
            pageRef.setRedirect(true);
            return pageRef;
            
            
       }
   }

I've tried a simple insert new opportunity test class, but I keep getting the error "Error: Compile Error: Constructor not defined".

Thank you!
I'm in need of some help.  I'm writing a trigger on Quote Line Item with intent to call a class to fire (the class will sync the line items back to the Opportunity) any time there is an after update on a Quote Line Item where the Quote's Primary_Quote__c checkbox == true.  Here is the code that I have currently.  It appears according to the debug that it is not returning the QLI ids.  Can someone please help steer me in the right direction?
 
trigger QuoteLineItem_Trigger on QuoteLineItem (after Update)
{

      ApexPages.StandardController stdController;
      public string currentRecordId {get; set;}
      set<id> quoteIds = new set<id>();
      
      if(trigger.isAfter && trigger.isUpdate) {
         system.debug('%%%%%%%%%%% Entering the After Update on Quote');

      for(QuoteLineItem QLI : trigger.new){
         if( QLI.Quote!=NULL && QLI.Quote.Primary_Quote__c == true ) {
         system.debug('%%%%%%%%%%% Not finding the right Quote');
         
         ApexPages.StandardController controller = new ApexPages.StandardController(QLI.Quote);
         system.debug('%%%%%%%%%%% +controller');
         vlocity_cmt.LineItemManagementController stdcontroller = new vlocity_cmt.LineItemManagementController(controller);
         stdcontroller.doSynchToQuote();
         system.debug('%%%%%%%%%%% This is not syncing');
    
         }                 
      }
   }
}

Any help is appreciated!  
Hi,

I am fairly new to developing classes and pages, and need assistance in getting a test class to work for this controller extension.  Your help is appreciated!

Controller:

public with sharing class OpportunityControllerExtension {

    private final Opportunity opp;
    
        public OpportunityControllerExtension(ApexPages.StandardController stdController)  {
            this.opp = (Opportunity) stdController.getRecord();
            
       }
       
    public PageReference Dismiss()  {
    
        opp.Display_Alert__c = false;
        update opp;
        
            PageReference pageRef = ApexPages.currentPage();
            pageRef.setRedirect(true);
            return pageRef;
            
            
       }
   }

I've tried a simple insert new opportunity test class, but I keep getting the error "Error: Compile Error: Constructor not defined".

Thank you!