• rashi krishan
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
1. We have 3 objects Account, Contact, Opportunity.

   In a VF page, we need to display the names of contact & Opportunity which are related to Account.
Hi,
Please let me how to write code in test class for try catch for the following code
     
            try{
              List <Lead> LeadsToUpdate = [Select Id from Lead where Id IN :Leadids AND isconverted = false FOR UPDATE];
              If(!LeadsToUpdate.isEmpty())
                Update LeadsToUpdate; 
             }

                catch(System.DmlException e){
             for (Integer i = 0; i < e.getNumDml(); i++) {
                if(e.getDmlType(i) == StatusCode.FIELD_CUSTOM_VALIDATION_EXCEPTION){
                   Trigger.new[i].addError(e.getDmlMessage(i));
                }
            
          
            }
        }
        
        
          Catch(Exception e){
             for (Integer i = 0; i < e.getNumDml(); i++) {
                if(e.getDmlType(i) == StatusCode.FIELD_CUSTOM_VALIDATION_EXCEPTION){
                   Trigger.old[i].addError(e.getDmlMessage(i));
                }
            
          
            }
       }

Please revert ASAP
. When the lead is converted, transfer the following data also to the opportunity:

Open activities
Notes and Attachments
Chat Transcript
As these are the related lists on Lead  and Opportunity.The values of these related list vales on lead need to be transfered to the respective related list on Opportunity.What approach should be taken for trigger. Please answer ASAP
There is a campaing performance report  which I need to refresh in every 2 mins .Plz answer ASAP 
I need a trigger which updates a field name Last modified by on lead when any of its related list is created or updated
. When the lead is converted, transfer the following data also to the opportunity:

Open activities
Notes and Attachments
Chat Transcript
As these are the related lists on Lead  and Opportunity.The values of these related list vales on lead need to be transfered to the respective related list on Opportunity.What approach should be taken for trigger. Please answer ASAP

Hi
my problem is in my VF PAGE i have  two  SAVE BUTTONS and CANCEL BUTTONS . i want to remove one SAVE BUTTON  and one CANCEL BUTTON.how to comment that SAVE BUTTON and CANCEL BUTTON
THANKS

RANGA

1. We have 3 objects Account, Contact, Opportunity.

   In a VF page, we need to display the names of contact & Opportunity which are related to Account.
how to change/delete profile in sfdc