Monthly Archives: August 2014

How to fire trigger only on Selected Day in salesforce

To achieve that trigger only works on selected day means, Formatting Date Date d = System.Today(); // you need to format date to date/time in order to format. DateTime dt = DateTime.newInstance(d.year(), d.month(), d.day()); String todayDay = dt.format(‘EEEE’); if(todayDay != ‘Saturday’ || todayDay !=‘Sunday’) {     // Process your logic. } Formatting Date/Time  … Continue reading

Posted in Trigger | 1 Comment