Skip to content

Fix: Person Account files not showing + App Builder component error#9

Open
Etienne-SFDO wants to merge 1 commit into
SalesforceLabs:masterfrom
Etienne-SFDO:fix/person-account-and-api-version
Open

Fix: Person Account files not showing + App Builder component error#9
Etienne-SFDO wants to merge 1 commit into
SalesforceLabs:masterfrom
Etienne-SFDO:fix/person-account-and-api-version

Conversation

@Etienne-SFDO

Copy link
Copy Markdown

Summary

  • Person Account bug: getRelatedFilesByRecordId was missing a return when searchTerm was empty, causing it to fall through to the search query instead of calling getAllRelatedList. Files would never display on Person Account records.
  • API version compatibility: Replaced WITH SECURITY_ENFORCED with WITH USER_MODE throughout FilesListControllerWITH SECURITY_ENFORCED is deprecated from API v55+.
  • App Builder crash: fileCard.js threw Cannot read properties of undefined (reading 'apiName') when changing component properties in Lightning App Builder, because objectInfoData can be undefined when getObjectInfo returns an error mid-edit. Added null guard on both occurrences.
  • API version bump: Updated all metadata from 48.0 to 63.0.

Test plan

  • Verify files display correctly on a Person Account record page
  • Verify files display correctly on a standard Contact/Account record page
  • Verify search/filter still works
  • Verify no component error when adding the component or changing column properties in Lightning App Builder

🤖 Generated with Claude Code

- FilesListController: add missing return statement so empty searchTerm
  correctly delegates to getAllRelatedList instead of falling through to
  the search query path
- Replace WITH SECURITY_ENFORCED with WITH USER_MODE throughout for
  compatibility with API v55+
- fileCard: guard objectInfoData null checks to prevent component error
  when properties are changed in Lightning App Builder
- Bump all metadata API versions from 48.0 to 63.0

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! It looks like @Etienne-SFDO is an internal user so signing the CLA is not required. However, we need to confirm this.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant