1. Home
  2. /
  3. Salesforce-apex
  4. /
  5. Apex Class - Call Salesforce Internal API (SOQL + DML)

Apex Class - Call Salesforce Internal API (SOQL + DML) - Salesforce-apex Typing CST Test

Loading…

Apex Class - Call Salesforce Internal API (SOQL + DML) — Salesforce-apex Code

Custom Apex class that queries Accounts and updates a field based on logic.

public class AccountUpdater {
	public static void normalizeAccounts() {
		List<Account> accs = [SELECT Id, Name FROM Account WHERE Name LIKE 'Test%'];
		for (Account a : accs) {
		a.Name = a.Name.replace('Test', '');
		}
		update accs;
	}
}

Salesforce-apex Language Guide

Salesforce Apex is a strongly typed, Java-like programming language used to implement custom business logic on the Salesforce Platform. It provides server-side execution within the multi-tenant Salesforce environment, enabling automation, integrations, transactional operations, and advanced customization beyond declarative tools.

Primary Use Cases

  • ▸Trigger-based automation for complex business rules
  • ▸Custom REST/SOAP services for integrations
  • ▸Batch and async processing for high-volume data jobs
  • ▸Custom Lightning Web Component (LWC) backend controllers
  • ▸Transactional orchestration and advanced validation logic

Notable Features

  • ▸Java-like syntax with Salesforce-specific data types and SObjects
  • ▸Trigger framework support for scalable event handling
  • ▸Built-in test framework with mandatory code coverage
  • ▸Async processing: Queueable, Batchable, Future, Scheduled
  • ▸First-class integration support (REST, SOAP callouts)

Origin & Creator

Created by Salesforce to allow controlled, secure server-side programming on the CRM platform, evolving since 2006 alongside the Force.com ecosystem.

Industrial Note

Large enterprises rely heavily on Apex to implement governed workflows, ERP-like processes, and integrations across distributed systems.

More Salesforce-apex Typing Exercises

Apex Trigger - Enforce Validation

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher