• keithpeters
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hi,

I created a BusinessHours object that defines the business hours between 2 AM and 3 AM each day (including weekends).

 

So when I run the following code, it usually returns 1800000 (i.e. 30 minutes); Except when I run it for 2011-3-13.

 

    System.debug(BusinessHours.diff(
        [select id from BusinessHours where Name = 'test 2 - 3 every day' limit 1].Id,
        Datetime.newInstance(2011, 3, 13, 2, 0, 0),
        Datetime.newInstance(2011, 3,  13, 2, 30, 0)));

06:46:40.037|METHOD_EXIT|[1]|BusinessHours.diff(String, Datetime, Datetime)
06:46:40.037|USER_DEBUG|[1]|DEBUG|0

 

Note also that I don't have any holidays attached to these business hours.

Any help would be much appreciated, thank you.

Hi,

I created a BusinessHours object that defines the business hours between 2 AM and 3 AM each day (including weekends).

 

So when I run the following code, it usually returns 1800000 (i.e. 30 minutes); Except when I run it for 2011-3-13.

 

    System.debug(BusinessHours.diff(
        [select id from BusinessHours where Name = 'test 2 - 3 every day' limit 1].Id,
        Datetime.newInstance(2011, 3, 13, 2, 0, 0),
        Datetime.newInstance(2011, 3,  13, 2, 30, 0)));

06:46:40.037|METHOD_EXIT|[1]|BusinessHours.diff(String, Datetime, Datetime)
06:46:40.037|USER_DEBUG|[1]|DEBUG|0

 

Note also that I don't have any holidays attached to these business hours.

Any help would be much appreciated, thank you.

I'm trying to retrieve the button overrides for the Campaign object using the Metadata API (v18), but I'm not getting any override info in the Campaign.object file.

 

This could be a package.xml problem, but I can't find any reference in the MetadataAPI docs or anywhere else that suggests ActionOverrides need to be explicitly named in the retrieve package.xml.

 

If I retrieve a custom packaged object in the same way, I do see all possible override actions. Why is this not working? Is there something I have to do differently with standard objects?

  • March 01, 2010
  • Like
  • 0