Here’s part of some code for a custom table view:
.attr('href', '/support/servlet/servlet.FileDownload?file=' + (row.Support_User__r && row.Support_User__r.Photo__r) ? <br> row.Support_User__r.Photo__r.skuid__AttachmentId__c : <br> null<br>)
I’m getting a javascript error on row.Support_User__r.Photo__r.skuid__AttachmentID__c:
Uncaught TypeError: Cannot read property 'skuid__AttachmentId__c' of undefined
How could the code get past the IF ? when Photo__r is undefined?
Any idea what might be going on here?