• Mikhail Shumenko
  • NEWBIE
  • 5 Points
  • Member since 2014

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

I try to create my own tool for executing Anonymous Code. For this purpose I'm using Tooling API.
Tooling API classes were generated by force-wsc-35.0.0.jar

For triggering an Apex debug log at the specified logging level I'm using "General" trace flag (LogType = 'DEVELOPER_LOG', DebugLevel = 'SFDC_Console').
Before anonymous code execution I set new value for folowing fields:
(StartDate = <now()>, ExpirationDate = <twoHowrsFromNow()>, DebugLevelId = <sfdcConsoleDebugLevelId>)

In first attempt I have been tried to set StartDate to "null" (I assume that if I will set StartDate to "null" then it implicitly set to <now()>)

But in this case I've got error:

FIELD_INTEGRITY_EXCEPTION - Trace flags can be active for up to 24 hours. Set ExpirationDate to be less than 24 hours from StartDate, or, if StartDate is null,
less than 24 hours from now.: Expiration Date

Then I try to set StartDate to <now()> directly and execute anonymous code again, but no Apex Log have been created.
The next day (and now) it worked fine. Can you explain how to check that when I execute anonymous code, then related log will be created necessary.

Also I have one more question. How to fetch log related to my Anonymous code execution ?
At the moment I forced to use 'fetchLastLogForUser(userId);' logic, with the hope that this is really what I need.

All what I want is a fast way to execute anonymous code and fetch related log.

Also I try to use Apex SOAP API but looks like this approach is deprecated, and I have some troubles with Log Level customization.

Can you advise me what should I do to achieve my goal ?

Best regards, Michael.
Hello,
I am currently using SFDC's Developer Console (because it's on the cloud) but would like to know the opinion of Developers who have worked with (or may have tried) other IDEs for Force.com.
I have come across various alternative IDEs such as:
  1. MavensMate which is not supported any more (Dec-2017) and the owner suggest to look at "Visual Studio Code Extension";
  2. Visual Studio Code Extension;
  3. Welkin Suite (It looks like a paid option but cannot see the price on their website);
  4. Illuminated Cloud (hosted within JetBrains Intellij IDEA); price seem to be 65 USD for 1 or few licenses (and we never know if the vendor will charge new versions)
  5. The traditional Force.com IDE Eclips based (Free but a real pain to install in a Mac);
  6. Any other IDE?
Could you possible let us know your opinion and if you would advise using one or the other? Maybe you could comment on Pros/Cons for each IDE you know?

Thank you very much.
  • December 03, 2017
  • Like
  • 2