Rule registry · FL-036

Prefer records over ID strings

Checked by the Salesforce Flow scan. Severity advisory.

FL-036AdvisoryMaintainability

What it requires. A flow that receives a record Id as a text variable and immediately queries the record should receive the record itself where the caller has it. Passing the Id forces an extra Get Records and loses the type information the platform provides.

Why it matters. An Id-only handoff throws away what the caller already knew and buys it back with another query.

How to fix it. Change the input variable to a record variable and pass the record from the calling context. Keep an Id-based input only where callers cannot supply the record.

Source. Lightning Flow Scanner, record-id-as-string

Is this rule worth checking?

Votes and comments are published here. We read them, and we publish what we change with the reasoning — a vote does not move a rule on its own.

Every rule we check, every source, and every one we turned down