• Antonino Cupi
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi all,

I have many picklist values translated by the Translate Workbench depending on the User Language, but I would get these values translated depending on a specific value of a field in the same object. In detail, I have the field "Payment Term" in the "Quote" object translated by the Translate Workbench, I would get the translated value of the "Payment Term" depending on the field "Quote Language" (This field is in the "Quote" object). How can I retrieve this requirement?

Thanks in advance,

Antonino
Hi all,

I have a issue about the following trigger:

if( CPQ_StopRecursion_TriggerQuote.stopRecursiveTriggerQuote != true ) {
      
        CPQ_StopRecursion_TriggerQuote.stopRecursiveTriggerQuote = true;
        
        
            
        if(Trigger.isUpdate) {
            
            try{
                
                List<Apttus_Proposal__Proposal__c> quote = [select id, name, Apttus_Proposal__Approval_Stage__c,  Apttus_QPApprov__Approval_Status__c, Delivery_Date__c, CPQ_Change_Delivery_Date__c  from Apttus_Proposal__Proposal__c where id IN : quoteId ];
               
                if ( quote != null){
                          for (Apttus_Proposal__Proposal__c proposal : quote){
                             
                              Apttus_Proposal__Proposal__c oldQuote = new Apttus_Proposal__Proposal__c();
                              oldQuote = Trigger.oldMap.get(proposal.Id);
                              String oldStatus = oldQuote.Apttus_QPApprov__Approval_Status__c;
                              String oldStage = oldQuote.Apttus_Proposal__Approval_Stage__c;
                              String newStatus = proposal.Apttus_QPApprov__Approval_Status__c;
                              String newStage = proposal.Apttus_Proposal__Approval_Stage__c;
                              Date oldDeliveryDate = oldQuote.Delivery_Date__c;
                              Date newDeliveryDate = proposal.Delivery_Date__c;
                              
                              if (oldStage == 'Approval Required' && newStage ==null){
                              
                                  proposal.Apttus_Proposal__Approval_Stage__c = 'Draft';  
                                  
                              }

                              system.debug('*** '+ oldStage + ' ' + newStage);
                              system.debug('*** '+oldDeliveryDate+' '+proposal.Delivery_Date__c);
                              if ( (oldDeliveryDate != null) && ( (oldDeliveryDate > newDeliveryDate ) || ( oldDeliveryDate != newDeliveryDate && newStage == 'Denied') ) ){
                              
                                  proposal.Apttus_QPApprov__Approval_Status__c = 'Approval Required';
                                  proposal.Apttus_Proposal__Approval_Stage__c =  'Approval Required';
                                  proposal.CPQ_Change_Delivery_Date__c = TRUE;
                                  
                              }
                              
                              quoteList.add(proposal);
                                  
                          }
                }
                
                
            }catch (Exception e) {
              system.debug('*** error');
            }
            
        }    
   
       }    
        
        if (quoteList.size()>0){
       
            update quoteList;
       
        }

The problem is that when I change only the field "Delivery_Date__c" of my quote, the trigger.oldMap returns the new value of the field. In particular, only if I change also the field "Apttus_Proposal__Approval_Stage__c " (in the same time with the change of the field Delivery Date), the trigger.OldMap returns the correct old value of the field "Delivery_Date__c".
How can I fix my issue?

Thanks
Hi all,

I created a Visualforce Email Template but I can't see the image of the email when I receive the email. In the salesforce preview the image is visible. I created a new document uploading my image and I have checked the "Externally Available Image" option. In the Visualforce Email template I created the following path:

<apex:image value="https://c.cs86.content.force.com/servlet/servlet.FileDownload?file=0157E000000Fs9D"  width="256" height="156" ></apex:image>

How can I see the logo when I receive the email?

Thanks
Hi all,

I have a issue about the following trigger:

if( CPQ_StopRecursion_TriggerQuote.stopRecursiveTriggerQuote != true ) {
      
        CPQ_StopRecursion_TriggerQuote.stopRecursiveTriggerQuote = true;
        
        
            
        if(Trigger.isUpdate) {
            
            try{
                
                List<Apttus_Proposal__Proposal__c> quote = [select id, name, Apttus_Proposal__Approval_Stage__c,  Apttus_QPApprov__Approval_Status__c, Delivery_Date__c, CPQ_Change_Delivery_Date__c  from Apttus_Proposal__Proposal__c where id IN : quoteId ];
               
                if ( quote != null){
                          for (Apttus_Proposal__Proposal__c proposal : quote){
                             
                              Apttus_Proposal__Proposal__c oldQuote = new Apttus_Proposal__Proposal__c();
                              oldQuote = Trigger.oldMap.get(proposal.Id);
                              String oldStatus = oldQuote.Apttus_QPApprov__Approval_Status__c;
                              String oldStage = oldQuote.Apttus_Proposal__Approval_Stage__c;
                              String newStatus = proposal.Apttus_QPApprov__Approval_Status__c;
                              String newStage = proposal.Apttus_Proposal__Approval_Stage__c;
                              Date oldDeliveryDate = oldQuote.Delivery_Date__c;
                              Date newDeliveryDate = proposal.Delivery_Date__c;
                              
                              if (oldStage == 'Approval Required' && newStage ==null){
                              
                                  proposal.Apttus_Proposal__Approval_Stage__c = 'Draft';  
                                  
                              }

                              system.debug('*** '+ oldStage + ' ' + newStage);
                              system.debug('*** '+oldDeliveryDate+' '+proposal.Delivery_Date__c);
                              if ( (oldDeliveryDate != null) && ( (oldDeliveryDate > newDeliveryDate ) || ( oldDeliveryDate != newDeliveryDate && newStage == 'Denied') ) ){
                              
                                  proposal.Apttus_QPApprov__Approval_Status__c = 'Approval Required';
                                  proposal.Apttus_Proposal__Approval_Stage__c =  'Approval Required';
                                  proposal.CPQ_Change_Delivery_Date__c = TRUE;
                                  
                              }
                              
                              quoteList.add(proposal);
                                  
                          }
                }
                
                
            }catch (Exception e) {
              system.debug('*** error');
            }
            
        }    
   
       }    
        
        if (quoteList.size()>0){
       
            update quoteList;
       
        }

The problem is that when I change only the field "Delivery_Date__c" of my quote, the trigger.oldMap returns the new value of the field. In particular, only if I change also the field "Apttus_Proposal__Approval_Stage__c " (in the same time with the change of the field Delivery Date), the trigger.OldMap returns the correct old value of the field "Delivery_Date__c".
How can I fix my issue?

Thanks
Hi all,

I created a Visualforce Email Template but I can't see the image of the email when I receive the email. In the salesforce preview the image is visible. I created a new document uploading my image and I have checked the "Externally Available Image" option. In the Visualforce Email template I created the following path:

<apex:image value="https://c.cs86.content.force.com/servlet/servlet.FileDownload?file=0157E000000Fs9D"  width="256" height="156" ></apex:image>

How can I see the logo when I receive the email?

Thanks