Activity Forums Salesforce® Discussions Why am I facing Internal Salesforce.com Error in Salesforce?

  • Vikas Kumar

    Member
    January 23, 2017 at 7:56 am

    Hi Chinna Sfdc,

    Can you share your batch then only we can able to rectify the error?

    Thanks

  • Avnish Yadav

    Member
    September 30, 2018 at 1:46 am

    Unfortunately, "Internal Server Errors" are VERY difficult to debug.  They typically involve a call into Salesforce to look up a "Gack" (only a few internal Salesforce employees have the ability do do this).  Even when they're able to lookup the Gack, it's not always evident what the root cause is.

    However, if I were you, I would start with stripping out much of your batch class and then start adding pieces back in one by one into your batch class, so that you can narrow down the culprit.

    For instance I would check the following:
    1) Does the batch class work with just the query and a simple system.debug(batch);
    2) Does the batch class work with just theq query, a simple system.debug, and adding the batch opportunities to a list?
    3) Does the batch class work with just the query, system debug, adding to the list and doing an update lstOpp?
    4) Does the batch class work with the query, system debug, adding to the list, and doing the partial processing?

    After looking at your code though, it looks like it *may* be that you're using a member variable in your batch class when you don't need to.  I suspect that this is the exception you're running into, although it could also be the fact you're using partial processing (Database.update(list,false)).

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos