attachmentId field not available for selection in image component

  • 1
  • Problem
  • Updated 11 months ago
  • In Progress
Trying to use the image component with an attachment, but I can't select the AttachmentId__c field from the lookup relationship, even though the field is in the model:

Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 11 months ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Matt, have you tried setting up a model on the object that's directly related to the AttachmentId? 
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Mark,

I have it working elsewhere with a more direct model. But shouldn't it work this way, too?
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
I am honestly not sure if a relationship that spans several degrees should work or not. I suggested this because it seemed like a fairly easy alternative to test. I can say from our documentation that an image component that's looking for an attachment only accepts Lookup Relationship Fields that have File as the Related Object. So, Skuid may be looking to see whether the object at the beginning of that string of references has a relation to the File object, and seeing that it doesn't, and thus not offering that as a choice. 
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Matt, this may be confusing, but you actually need to select the Image__c Reference field, NOT the Attachment Id field. The only fields available for selection will be Reference fields on the Image__c object. So basically, just go back a level and select the Image field and you should be good.

That said, we made some major changes and bug fixes to this behavior in Millau, in particular, deeply-nested Image__c fields didn't work prior to Millau, so I recommend making sure you're on the latest Millau.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Ah, thanks Zach. I'm still on 9.5.