• MarkL
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 8
    Replies
Is there any way to mass delete ApexLog objects that is not from the developer console? When you have around 800 of them the developer console takes forever to delete them and it looks like ApexLog objects can't be deleted via SOQL calls in APEX, so what's the alternative to sitting for 5 minutes waiting for my logs to clear off of a half frozen developer console?
  • December 03, 2018
  • Like
  • 0
Is there any way to mass delete ApexLog objects that is not from the developer console? When you have around 800 of them the developer console takes forever to delete them and it looks like ApexLog objects can't be deleted via SOQL calls in APEX, so what's the alternative to sitting for 5 minutes waiting for my logs to clear off of a half frozen developer console?
  • December 03, 2018
  • Like
  • 0
Team I have a 2 part question:

I have a formula field with TEXT output in order to use Now() in other text fields (ie "10/29/2018 @ 12:00:00 the field was updated").  The only requirement is that the field display the time in Eastern Time taking into account DST.  Until today I have been updating the formula twice per year and thought I'd revisit the requirement after several SF updates, and I've come up with (what I think is) a pretty good formula (see below). I would like input on the following:

1.  Tell me how this is wrong (if at all).  I can't see any reason why it would break, but I'm not confident it won't).  The true and false values are the original formulas I would manually switch each March and November.
2.  If anyone can tell me how to (code snippet) format the date time "MM/DD/YYYY HH:MM AM/PM", that would be awesome (I am missing the AM/PM piece).

Field Type:  Formula
Return Type: Text
IF(
    AND(
        TODAY() > (DATE(YEAR(TODAY()),3,0+7*1) - WEEKDAY(DATE(YEAR(TODAY()),3,8-1))),
        TODAY() < (DATE(YEAR(TODAY()),11,0+7*2) - WEEKDAY(DATE(YEAR(TODAY()),11,8-1)))
    ),
    TEXT(MONTH(TODAY()))&"/"&TEXT(DAY(TODAY()))&"/"&TEXT(YEAR(TODAY()))&" "&"@"&" "&MID(TEXT(Now()-(4/24)),12,8),
    TEXT(MONTH(TODAY()))&"/"&TEXT(DAY(TODAY()))&"/"&TEXT(YEAR(TODAY()))&" "&"@"&" "&MID(TEXT(Now()-(5/24)),12,8)
)

 
I have a Before insert trigger on Contact class, which is calling a Future method from different class.
That future method calls a web url whch returns a value.
How do I take that returned value back to Trigger?

 

I have a simple formula field, below, which evaluates correctly when viewing it in the page layout.

 

if (User__r.Profile.Name = 'System Administrator', 'FIXED TRUE', User__r.Profile.Name)

 

The problem I have is when I try and lookup / reference the field in SOQL, i get a different result to what i see in the page layout, SOQL below:

 

select name, isActive__c from Incentive_Plan__c where user__c =:UserId

 

For the simple formula field logic above, the SOQL query returns the value 'PT1 ', I have no idea where it is getting this value from !

 

Hope someone can explain this behaviour.

 

Thanks

  • July 04, 2012
  • Like
  • 1

I have a simple formula field, below, which evaluates correctly when viewing it in the page layout.

 

if (User__r.Profile.Name = 'System Administrator', 'FIXED TRUE', User__r.Profile.Name)

 

The problem I have is when I try and lookup / reference the field in SOQL, i get a different result to what i see in the page layout, SOQL below:

 

select name, isActive__c from Incentive_Plan__c where user__c =:UserId

 

For the simple formula field logic above, the SOQL query returns the value 'PT1 ', I have no idea where it is getting this value from !

 

Hope someone can explain this behaviour.

 

Thanks

  • July 04, 2012
  • Like
  • 1