• Srinivas Testing
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 1
    Replies
HI,
How to hide or greyed out of 2 text field in the child record based on parent record picklist value in VF Page? Can anyone help me?

Thanks,
Srini
Hi Team, 
I am new resource i don't know how to write test class i have written triggerhandler class on opportunity and i post the code below , can you make test class 
public class OpportunityTriggerHandler{
    public void handleTrigger (Opportunity[] trigNew){
        if (trigger.isBefore){
            if(trigger.isUpdate){
                handleBeforeInsert(trigNew);
                }
               } 
            else if (trigger.isInsert){
                handleBeforeInsert(trigNew);
                }
       }         
    public void handleBeforeInsert(Opportunity[] trigNew)
    {
        for (Opportunity objOpps : trigNew)
        {
            if ((objOpps.StageName == 'Prospecting') || (objOpps.StageName == 'Perception Analysis') || (objOpps.StageName == 'Qualification') || (objOpps.StageName == 'Needs Analysis')
                                                 || (objOpps.StageName == 'Value Proposition')||(objOpps.StageName == 'Id.Decision Markers')||(objOpps.StageName == 'Proposal/Price Quote'))
            {
               
               if ( objOpps.Win_Lose_Comment__c != null){   
                objOpps.Win_Lose_Comment__c.addError('Donfill the  value Win/Lose Comment');
                }
                
               if ( objOpps.Win_Lose_Reason__c != null){
                objOpps.Win_Lose_Reason__c.addError('Don t fill  the value Win/Lose Reason');
                }
                
                if( objOpps.Type_Lose__c != null)
                {
                objOpps.Type_Lose__c.addError('Dont fill the value Type Lose');
                }
        
            }
        
            else if ((objOpps.StageName == 'Negotiation/Review') || (objOpps.StageName == 'Closed Won'))
            {
                if ( objOpps.Win_Lose_Comment__c == null){
                       objOpps.Win_Lose_Comment__c.addError('Please select the value Win/Lose Comment'); 
                    }
                if ( objOpps.Win_Lose_Reason__c == null)
                {
               
                   objOpps.Win_Lose_Reason__c.addError('Please select the value Win/Lose Reason');
                }      
               
            }
        
            else if(objOpps.StageName == 'Closed Lost')
            {
                if ( objOpps.Win_Lose_Comment__c == null){
                        objOpps.Win_Lose_Comment__c.addError('Please fill the  value Win/Lose Comment');
                 } 
                 
                if ( objOpps.Win_Lose_Reason__c == null){
                        objOpps.Win_Lose_Reason__c.addError('Please  fill  the value Win/Lose Reason');
                 }
                 
                  if( objOpps.Type_Lose__c == null)
                {
                  
                  
                      objOpps.Type_Lose__c.addError('Please fill the value Type Lose');
                }
            
            
           // else{}
            
           }     
            
        }
    }  
}
Hi,
On account object I have two custom date type fields
Contract Start date__c
Contract end date__c
same fields I am calling in PDF document,
Contract_Start_date__c is reflecting as I input on account object, But
Problem: When Input contract_end_date__c as 12/31/2017 on account record page, the date on PDF is showing as 12/31/2018
(a difference of year)

Note* we don't have any validations on that fields.

Kindly suggest how to overcome this error.
Hi,
from image..once table extends to 2nd page , the last border is breaking..Please help me to manage this table wthout breaking border line..
please check my attachment .
User-added image
how to add scroll bar on page block section below through vf page