Comments (10)
Can you please add a comment for using relationships for Managed Packages to include the Namespace also. Eg
dsfs__DocuSign_Envelopes__r
from sfdc-related-files-lightning.
Disregard... embarrassingly simple fix... just add "__r" to the custom relationship name!
from sfdc-related-files-lightning.
Love this component! Quick question for you: does this only work in master-detail relationships, or can I also include lookup relationships? I've been attempting to make this work for custom objects that have a lookup field to the account but I'm not sure if I'm doing it incorrectly or if it's not supported.
Thanks so much!
**Cancel that - I answered my own question!
With a lookup relationship, I went to the field that looks up to the account and used the "Related List Label", adding in underscores between each word and appending it with __r.
What I noticed did not work was a related list label that had parenthesis. I removed them and was able to save the details in the Child Relationships section on the Lightning page editor.
Now the component displays these objects with a count of how many files, but those custom objects with lookup relationships to the account are not actually displaying the files or the count of them.
Are these types of relationships supported?
from sfdc-related-files-lightning.
Hi @steinstv,
Glad you like the component, thanks for the feedback!
Those custom relationship fields are tricky. Glad you figured it out; have to include the __r to the relationship name. It would be nice if Salesforce UI displayed the suffix. Many people get stung by that.
Hrm.... maybe I can try to infer if a relationship by the entered text exists if all its missing is the __r suffix 🧐
from sfdc-related-files-lightning.
Hi @douglascayers , great app. I also had this issue until I found this thread. I think all you need to do is update the wording of the last paragraph under the title "How do I customize which related lists are shown in the vertical navigation?" to clarify that you need to add the __r suffix. I was following those instructions, and was copying the exact value in the child relationship name field because the documentation didn't actually say to add the __r suffix (although I see it's there in the example in the previous paragraph.
from sfdc-related-files-lightning.
Thanks @JulianneNashSmith, I've updated the instructions hopefully clarifying about when to need the __r
suffix and linking back to this issue.
from sfdc-related-files-lightning.
Hello,
I see a comment above about a managed package. Do I need to be doing anything differently when trying to view a relationship with a manged package?
My child relationship n ame is Policys, so i'm inputting Policys__r and can't pull up the list. Would love your thoughts. Thanks!
from sfdc-related-files-lightning.
Hi @agrau84, I'm glad you figured out how to specify the child relationship name. For the other question you brought up, would you mind opening a new issue with screen shots demonstrating what you mean by:
Now the component displays these objects with a count of how many files, but those custom objects with lookup relationships to the account are not actually displaying the files or the count of them.
Thanks
from sfdc-related-files-lightning.
I'm unable to see contacts. I have a custom object (service__c) that references contacts as a lookup (vendor__c), but i'm unable to see it as a related record on the related files list.
from sfdc-related-files-lightning.
I'm using the component on one of my custom object layouts. This custom object has lookup with account, contact, oppty and leads. The child relationship name is "Documents", under the child relationships, i added Documents__r.
I keep getting the error:- "Sorry, error initializing component Cannot read properties of undefined (reading 'objectName')"
Has anyone resolved this issue? Would love to know how to tackle this.
TIA
from sfdc-related-files-lightning.
Related Issues (20)
- Files related to the Account HOT 1
- Recent Error - "Sorry, error initializing component" HOT 4
- Lookup relation vs Master-Detail HOT 2
- Include Attachments HOT 1
- Ability to sort columns
- Error when using Field Set
- it is not showing the related files/content HOT 3
- Download related files
- Problems getting this to work in Classic.
- Page CF_ChildFilesPage does not exist HOT 1
- 2 classes missing in package.xml
- Related Files is rolling up on all the tabs
- Translation
- File opens in new browser tab
- See files of parent records?
- Make Component available for mobile app
- Post Winter'21 release, error "You do not have access to the Apex class named :CF_ChildFilesController "
- Error Initializing Component - dca_junto_files:Too many callouts: 101 HOT 3
- Cannot set any child relationships and filter the objects
- Sorry, Error Initializing component.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfdc-related-files-lightning.