• Rahul Agarwal
  • NEWBIE
  • 4 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 10
    Replies

Hi SFDC Developers,

 

I have one VF page and it contains a one picklist.SO now i want to append all account names in this picklist.so how i can achiev this task?

 

Thanks & regards,

SFDC Fun...!!!

i dont have a problem, was jsut curious if theres soql limits when running test classes

i'm trying to go back out to the db after any updates to get latest and dont want a large test class to get dangerously large

I created a new custom field that is a replacement of an existing one.  The existing field is referenced in an Apex Class.  When I attempt to update the Apex Class with the new field API name I receive the following error:

 

Error: Compile Error: alias is too long, maximum of 25 characters

 

Has anyone seen this error before?  Any suggestions on how to correct it?

 

Thanks

 

  • November 15, 2013
  • Like
  • 0

Hi all,

 

validation atleast one checkbox to checked from list of checkboxes

 

advance thanks

Hi All

 

I want to update the OwnerId of a record based on a value of picklist (UCB_Status__c). 

Normally it would be easy to do with a before insert, before update trigger. But there is already a Before Insert, Before Update trigger in the system for the same object and I can not touch that trigger. 

 

My trigger:

trigger UCB_Coaching_Report_A_I_A_U on Coaching_Report_vod__c (after Insert, after Update)
{
      UCB_ManageCoachingReport.assignOwner(Trigger.newMap.keySet());
}

 The trigger that can not be touched: 

trigger VOD_COACHING_REPORT_BEFORE_INSUPD_TRIGGER on Coaching_Report_vod__c ( before insert, before update) {
    if(VEEVA_PROCESS_FLAGS.getUpdateCR()== true){
        System.Debug('Veeva process_Flags');
        return;
    }
    
    //UCB_ManageCoachingReport.assignOwner(Trigger.New, Trigger.oldMap);
    
   for (Integer i = 0 ; i < Trigger.new.size(); i++) 
    {
        System.Debug('In Veeva for lus');
       if (Trigger.new[i].Employee_vod__c != null ) 
         {
             System.Debug('In Veeva if employee is verschillend van 0');
             Trigger.new[i].OwnerId = Trigger.new[i].Employee_vod__c;
         }
    }   
}

 

 

The class which contains the invoked method:

public class UCB_ManageCoachingReport{   
   public static void assignManager(List<Coaching_Report_vod__c> coachingReportList){
        for(Coaching_Report_vod__c cr: coachingReportList){
            System.Debug('de user met id ' + UserInfo.getUserId() + ' wordt toegewezen aan het mananager veld');
            cr.Manager_vod__c = UserInfo.getUserId();
        }
    }

public static void assignOwner(Set<Id> crIds)
{         
       List<Coaching_Report_vod__c> crList = 
         [select Id, OwnerId, UCB_Status__c, Review_Date__c, Manager_vod__c, Employee_vod__c from Coaching_Report_vod__c where Id in:crIds];
       
          for(Coaching_Report_vod__c cr: crList )
          {               
                     if(cr.UCB_Status__c == 'Sent')
                     {
                       cr.OwnerId = cr.Employee_vod__c;
                     }
                     else
                     {
                        cr.OwnerId = cr.Manager_vod__c;
                     }     
           }
         
          update crList;      
    }
}

 

When I create a new Coaching Report I get the following error:

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger UCB_Coaching_Report_A_I_A_U caused an unexpected exception, contact your administrator: UCB_Coaching_Report_A_I_A_U: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0 with id a1DZ0000000WFLmMAO; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, UCB_Coaching_Report_A_I_A_U: maximum trigger depth exceeded Coaching_Report_vod trigger event AfterInsert for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm] Coaching_Report_vod trigger event AfterUpdate for [a1DZ0000000WFLm]: []: Class.UCB_ManageCoachingReport.assignOwner: line 33, column 1

 

 

I spend multiple our, changed my code 23235235253 times and still don't got a solution. 

Is it just not possible due to the trigger I can not change? 

 

Thanks in advance!!! 

i have four tabs developed on my visualforce page with two buttons on each page i.e previous and next button . i want to have a functionality on click of previous and next button to show the user that the page is loading until the page is fully loaded . how can this be done ?

Thanks in advance

Hi ,

 

Can any once face this problem when we executin some code using developer console the log will not open.

 

Any one face this problem.

 

Thank you

  • November 15, 2013
  • Like
  • 0

Hi All,

 

Requirement to automatically include any attachments sent with an email from SFDC on the activity history record. 

 

Can anyone please let me know for opportunity how we can achieve this.

 

 

Thanks in advance for help :)))

 

 

Thanks.

 

 

Set History Tracking   ?

 

set history tracking only for standard  object  or  custom  object also ?

if custom objects also where it is to set ?

 

thank u ..

Query 

List<Account> accounts =  [Select Id, Name, (Select Id, Name From Contacts) From Account ]

 

for(Account a : accounts){
for(Integer i=0; i < a.Contacts.size() ; i++){
if(someCondition){ a.Contacts.remove(i);
} } }

 This should idealy remove contacts where condition is satisfied

 

But it dose not happen