search.lookupFields (Preferred for Performance)
Pros:
✅ Faster execution – Retrieves only the required fields instead of loading the entire record.
✅ Lower governance cost – Uses fewer script governance units (2 units vs. 10+ for record.load).
✅ Ideal for simple lookups – Useful when fetching a few fields (e.g., getting a status, subsidiary, or custom field).
Cons:
❌ Read-only – Cannot modify and save data; only retrieves values.
❌ Limited to indexed fields – Works best with simple field types (text, dates, select fields, etc.).
record.load (For Editing or Complex Data Needs)
Pros:
✅ Allows modification – Use when updating and saving records.
✅ Retrieves all fields – Can access sublists and related data.
✅ Better for complex processing – When needing multiple fields across subrecords.
Cons:
❌ Higher governance cost – Consumes at least 10 script units per load.
❌ Slower execution – Loads the full record, which can be unnecessary overhead if you need only a few fields.