Activity Forums Salesforce® Discussions What are the Apex best practices in Salesforce ?

  • krati

    Member
    January 22, 2020 at 12:07 pm

    Some of the best practices are:

    1: Bulkify your Code

    2: Avoid SOQL Queries or DML statements inside FOR Loops

    3: Bulkify your Helper Methods

    4: Use of the Limits Apex Methods to Avoid Hitting Governor Limits

    5: Avoiding Hard coded IDs

    For details go to:
    https://developer.salesforce.com/page/Apex_Code_Best_Practices

  • Shweta

    Member
    January 22, 2020 at 1:43 pm

    Apex best practices in Salesforce are :

    • Bulkify your apex code
    • Avoid Query or DML statements inside the For loop
    • Bulkify Helper methods
    • Streamlining Multiple Triggers on the Same Object
    • Use @future Appropriately
    • Write Test Methods to Verify Large Datasets

     

     

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos