Component Not Showing Data
Quick solutions when your Avonni App Builder Component appears on the page but displays no records or shows "No items to display."
Quick Diagnostic Checklist
Before diving into detailed solutions, quickly verify:
If any of these fail, jump to the relevant section below.
Invalid Filter Syntax
Symptom
Component appears but shows no data, even though records exist that should match the filter.
Common Mistakes
1. Double Equals Instead of Single
❌ Wrong:
Status == 'Active'
✅ Correct:
Status = 'Active'
Why: SOQL uses single =
for equality comparisons, not double ==
like JavaScript.
2. Invalid Operators
❌ Wrong:
Name CONTAINS 'Acme'
✅ Correct:
Name LIKE '%Acme%'
Why: SOQL uses LIKE
with wildcards, not CONTAINS
.
3. Missing Quotes Around Text Values
❌ Wrong:
Status = Active
✅ Correct:
Status = 'Active'
Why: Text values in SOQL must be wrapped in single quotes.
4. Quotes Around Numbers
❌ Wrong:
Amount = '50000'
✅ Correct:
Amount = 50000
Why: Number fields should not be quoted in SOQL filters.
How to Fix
Step 1: Test in Developer Console
Before fixing the component, verify your filter logic works:
Open Developer Console (Setup > Developer Console)
Click Query Editor tab
Test your filter as a SOQL query:
SELECT Id, Name FROM Opportunity WHERE Status = 'Active'
If it returns results, the syntax is valid
If it errors, review the error message for guidance
Step 2: Update Component Filter
Copy the working WHERE clause from Developer Console directly into your component's Filter property.
Step 3: Verify Results
Save the Lightning page and test with actual data.
Need more help with filter syntax? See Component Properties Reference for detailed SOQL filter patterns.
Field API Name Issues
Symptom
Component shows no data or displays errors about invalid fields.
Common Mistakes
1. Using Label Instead of API Name
❌ Wrong:
Filter: Stage = 'Closed Won'
Columns: Name,Stage,Close Date
✅ Correct:
Filter: StageName = 'Closed Won'
Columns: Name,StageName,CloseDate
Why: You must use the field's API name, not its display label.
2. Case Sensitivity
❌ Wrong:
Columns: name,email,phone
✅ Correct:
Columns: Name,Email,Phone
Why: Field API names are case-sensitive and typically use PascalCase.
3. Custom Field Suffix Missing
❌ Wrong:
Filter: Region = 'West'
✅ Correct:
Filter: Region__c = 'West'
Why: Custom fields require the __c
suffix.
4. Incorrect Relationship Syntax
❌ Wrong:
Filter: Account_Name = 'Acme Corp'
✅ Correct:
Filter: Account.Name = 'Acme Corp'
Why: Relationship fields use dot notation, not underscores.
How to Find Correct Field API Names
Method 1: Object Manager (Most Reliable)
Setup > Object Manager
Select your object (e.g., Opportunity)
Click Fields & Relationships
Find your field and copy the API Name exactly
For custom fields, include the
__c
suffix
Method 2: Field Inspector
Go to any record page for the object
Click gear icon > Edit Page
In Lightning App Builder, hover over any field
API name appears in tooltip or field properties
Pro Tip: Always copy/paste field API names rather than typing them to avoid spelling errors.
Object and Field Permissions
Symptom
Component shows no data for some users but works fine for administrators.
Understanding Permission Layers
Salesforce security has multiple layers that all must allow access:
Object-Level Read Permission - User must have Read access to the object
Field-Level Security (FLS) - User must have Read access to each field
Record-Level Sharing - User must have access to specific records (covered in next section)
Check Object Permissions
For Profiles:
Setup > Profiles
Select user's profile
Click Object Settings
Find the object (e.g., Opportunity)
Verify Read permission is checked
For Permission Sets:
Setup > Permission Sets
Select relevant permission set
Click Object Settings
Find the object
Verify Read permission is checked
If missing: Enable Read permission and test again.
Check Field-Level Security
For Specific Fields:
Setup > Object Manager
Select your object
Click Fields & Relationships
Click the field name
Click "Set Field-Level Security"
Find user's profile
Verify Visible is checked
Quick Test: Log in as the affected user and try to view the field on a record detail page. If you can't see it there, the component won't show it either.
Common Permission Scenarios
Scenario 1: Admins See Data, Standard Users Don't
Cause: Standard User profile lacks object Read permission
Solution: Grant Read permission to Standard User profile or create custom permission set
Scenario 2: Some Fields Missing from Component
Cause: Field-level security restricts those fields
Solution: Grant field Read access to user's profile or use different fields
Scenario 3: Works in Sandbox, Not Production
Cause: Profile permissions differ between environments
Solution: Verify and sync permission settings across environments
Sharing Rules and Record Access
Symptom
Component shows fewer records than expected, or different users see different amounts of data.
Understanding Sharing Rules
Even with object and field permissions, users must have record-level access to see specific records. Salesforce sharing rules control this access.
Key Concept: The component filter is applied AFTER sharing rules. Users only see records they can access, even if those records match the filter.
Check Organization-Wide Defaults (OWD)
Steps:
Setup > Sharing Settings
Find your object in the list
Check the "Default Internal Access" column
Common Issue: OWD is set to Private, but users need to see records they don't own.
Check Sharing Rules
Steps:
Setup > Sharing Settings
Scroll to your object's Sharing Rules section
Review existing rules
Common Sharing Rules:
Role-based: Share records with users in specific roles
Criteria-based: Share records matching criteria (e.g., all accounts in "West" region)
Owner-based: Share records based on owner's role or territory
If users should see records but don't: Create or modify sharing rules to grant access.
Check Manual Sharing
Sometimes records are manually shared with specific users:
Steps:
Go to a record the user should see
Click Sharing button
Check who has access
Manually add the user if needed
Test as the User
Best Practice: Always test components by logging in as the actual user experiencing the issue.
Steps:
Setup > Users
Find the user
Click "Login" (if you have that permission)
Navigate to the Lightning page with the component
Verify what data appears
What to look for:
Do any records appear?
Are fewer records shown than expected?
Do fields show "Insufficient Access" or appear blank?
This reveals exactly what the user experiences and helps identify permission gaps.
Last updated
Was this helpful?