• KtHasNoLimit
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
When manager reject opportunity then error message display from trigger, but i want to bypass addError message in apex trigger. for spicific condition user face addError message, but when opportuntiy reject by manager then i want to by pass this error message.

Please suggest

Regards
Mukesh 
I am trying to update the same id in a list mutliple times, is there a way to do that 
List<contact> ConList = new List<contact>();

contact pe = new contact();
pe.id =  '0032900000QsV17';
pe.phone__c= false;
ConList .add(pe);

contact pe2 = new contact ();
pe2.id =  '0032900000QsV17';
pe2.phone__c= true;
ConList .add(pe2);


Database.SaveResult[] srList = Database.update(ConList ,false);
System.debug('srList===' + srList);
I'm using a javascript button to create a partner user account.
I'm getting the below error when i click the button.
'Cannot read property 'success' of undefined.

{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
 if("{! Contact.Partner_User_Enabled__c}" == true )
{
alert( "Partner user already exists" );
}
else
{
var result = sforce.apex.execute("EnablePartnerPortal","createUser",{"partnerContact":'{!Contact.Id}'});
if(result[0].success == 'false')
{
alert("Account is not partner");
}
   
}
 window.location.href="/{!Contact.Id}";
Hi,

I have a controller for which i have written a test class which covers only 50%, I am not able to cover the following lines for which i need help on it

//
   if(firstcontract.Contract_Start_Date__c<contractObj.Contract_Start_Date__c && firstcontract.Contract_End_Date__c<contractObj.Contract_End_Date__c ){
                          if(firstcontract.Contract_End_Date__c>=contractObj.Contract_Start_Date__c){
                          firstcontract.Contract_End_Date__c=contractObj.Contract_Start_Date__c.addDays(-1);
                          update firstcontract;//put the list and update
                          }                       
                        }  
                        else{
                        system.debug('elsesection');
                        if(contractObj.Contract_End_Date__c>=firstcontract.Contract_Start_Date__c){
                          contractObj.Contract_End_Date__c=firstcontract.Contract_Start_Date__c.addDays(-1);
                          update contractObj;// put the list and update
                          }    
                          
                          
                          //
                          
                            if(idVsContractmap.containsKey(controbj.Account__r.Id)) {
                List<Contract__c> contrAccList = idVsContractmap.get(controbj.Account__r.Id);
                contrAccList.add(controbj);
                idVsContractmap.put(controbj.Account__c, contrAccList);
            } else {
                idVsContractmap.put(controbj.Account__c, new List<Contract__c> { controbj });
            }   
            //

Kindly help me pls

Thanks in advance