Hello, I've hit a snag in the trailhead module named "Build a Custom Search Component". When I try to save the customSearchResultsList.cmp, I get a FIELD_INTEGRITY_EXCEPTION error message: Failed to save customSearchResultsList.cmp: The attribute "recordId" was not found on the COMPONENT markup://c:customSearchResultItem: Source.
Could you help with a clue?
Thanks!
#Trailhead Challenges #Trailhead
Hi @Emmanuel Danso👋,
The FIELD_INTEGRITY_EXCEPTION you're seeing usually means that the component customSearchResultItem you're referencing in customSearchResultsList.cmp is missing the recordId attribute definition.
🔧 How to fix it:
Please open your customSearchResultItem.cmp file and make sure it has the following attribute defined at the top of the component:
xmlCopyEdit<aura:attribute name="recordId" type="String" />
This tells the component to expect a recordId value when used inside other components.
✅ After adding:
- Save customSearchResultItem.cmp.
- Then re-save customSearchResultsList.cmp.
This should resolve the error. Let me know if you run into any more issues—happy to help further!
Would you like me to help review your full code for both components if the error still appears?