Apex Tips

  • Wanted to know the starting 3 digits for any object in your code, here is the snippet: Opportunity.sObjectType.getDescribe().getKeyPrefix()
  • Id will be retrieved automatically in a SOQL query
  • If we wanted to query ‘accountId, account.name’ fields in a query just specify ‘account.name’ which will retrieve ‘accountId’ automatically
  • SOQL query can be ORDER BY 32 fields
  • SOQL/SOSL statements cannot exceed 10,000 characters
  • SOQL query can’t run more than 120 seconds, better optimize your query
  • If 10 synchronous processes are running more than 5 seconds then the 11th process will be terminated by salesforce – Native Salesforce concurrent limit
  • If 25 synchronous processes are running more than 20 seconds then the 26th process will be terminated by salesforce – Salesforce API concurrent limit
  • Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s