New answers tagged

1 vote

BusinessHours.add() returning GMT instead of local

system.debug('ResultGmt is ' + BusinessHours.addGmt(bh.Id,startDt,(1*4)*60*60*1000)); Calls DateTime#toString, which will always display in GMT. To verify this, try: System.debug(
sfdcfox's user avatar
  • 487k
0 votes

How do I find the relationship between BusinessHours and Holiday?

Based on the document seems it's Many to one kind of relationship is available in Business Hours and it's associated Holiday. The document clearly described this as followingly, You can associate up ...
Raj's user avatar
  • 1,315
0 votes

Set Business Hours in Apex Test Code

I had a scenario where I was using the isWithin() method of the BusinessHours class. Since Salesforce does not provide us with a way to programmatically set the BusinessHours within our unit test code ...
Arthlete's user avatar
  • 4,907

Top 50 recent answers are included