• Patrick Arkesteyn 2
  • NEWBIE
  • 0 Points
  • Member since 2017

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

Hi,

I'm a beginning Force.com IDE user. Great product !

I would like to debug a web service developed by other guys, who left the company. 
This is the code for the test class:

@isTest
private class WS01_Account_GetUpdate_TEST {
    
    private static testMethod void getAccountsTest() {
        Test.startTest();
        Account acc = testUtils.createAccount('testAccount');
        insert acc;
        
        DateTime dateTimeValue = DateTime.now().addMonths(-1);
        RestRequest req = new RestRequest();
        RestResponse res = new RestResponse();
        req.requestURI = '/services/apexrest/Accounts/';
        req.httpMethod = 'GET';
        RestContext.request = req;
        RestContext.request.params.put('iRefDateTime', String.valueOf(dateTimeValue));
        RestContext.response= res;
        
        WS01_Account_GetUpdate.getAccountWithoutIdTEPORTAL();
        Test.stopTest();
    }
  }


My question is what to type in "Source to execute" in the "Execute Asynchronous" tab in Debug perspective.
I tried with:

new WS01_Account_GetUpdate_TEST().getAccountsTest();

But I'm getting :

Compile error at line 1 column 1
Type is not visible: WS01_Account_GetUpdate_TEST


Can anybody help me out here please ?

Many thanks in advance,

Patrick

Hi,

I'm new to the SF scene, and have an Oracle background.
A reoccuring procedure I'm doing in Oracle is:
  • Execute a DML (insert, update, delete) statement
  • Check the correctness by executing a query (select) statement
  • If OK, I commit. If not, I rollback all DML
My question: is this way of working possible using Developer Console ? As I understand, DML statements are always commited. Unless you set some savepoint. Can I first execute some anonymous Apex with DML code preceded by a savepoint, then execute a select, then execute commit or rollback.
Or is there another way, maybe outside Developer Console, to handle this ?

One more question: is there a way to save/open scripts having anonymous Apex ?

Thanks,
Patrick
I am trying to use the following SOQL query in Data Loader expecting to receive a translated Status value:
SELECT Id, Subject, toLabel(Status), CreatedDate FROM Task ORDER BY CreatedDate DESC LIMIT 5
It does not return any value for that column for this query.

Is there a way to get a translated picklist value in Data Loader?