Skip to content

Validate SObject Types in Input List #2

Description

Summary

Ensure all SObjects in the input list are of the same type before returning the first record.

Proposed Change

  • Add validation logic in getFirstRecord to check that all records are of the same SObject type.
  • Return an error message or null if types are mixed.

Benefit

Prevents unexpected casting issues and improves robustness.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions