douglascayers/sfdc-related-files-lightning

Error with Activities related list from custom lookup field

Closed this issue · 6 comments

Hi,

I'm trying to use your solution, with custom object (Company__c).
The company object have related list of activities (On Task I have custom lookup field to Company__c).

But, I don't have the option to put Activities__r (Child relationship name) in the component..

screen shot 2017-08-28 at 12 37 47 pm

Any suggestions?

Thanks, Lee.

Hi Lee,

I'll investigate and follow up. Could you share a screen shot of the custom field details in Setup of your lookup field on Task object?

Thanks,

Doug

Question, does this error occur when you leave the "Child Relationships" attribute blank in App Builder? By default all relationships will be shown.

If it works that way then save the page in App Builder. On the page in normal view (not App Builder), hover your mouse over the relationship labels in the vertical navigation. A tooltip should appear that displays the API name of the relationship. Confirm what the API name is listed there.

Thanks

Hi Douglas,

The error occurred when I'm trying to save my changes.

see screenshot of Activity custom fields (my relationship field: Company__c):
screen shot 2017-08-28 at 4 24 47 pm

Thanks @leeBringg,

I've confirmed that for custom lookup fields on Activity object that the SObject Describe info for the child relationships gives me special object name LookedUpFromActivity which is not queryable and is causing the issue.

I believe I simply need to update the code to look for that object name and swap out for a standard queryable object name instead like Task and Event.

image

I'll notify you once a new version of the app with this fix is made available. Until then, do not specify child relationship names for custom lookup fields on Activity object.

Thanks for the feedback and catching this issue,

Doug

@leeBringg - I've got fix in the develop branch and will get this out in the next release. Thanks!

Hi Douglas,

Thank you !