APIs & Integrations

AMichaels
Participant

CRM UI Extension - File Name Display?

SOLVE

I am developing a UI extension to display the actual image for files uploaded to an object as an attachment so the user does not have to click on them.

 

They are in a field with the file type, and when I get the properties using fetchProperties I'm given back a semicolon delimited string of the IDs of the attachment without any additional metadata:

 

176712404652;176712183988

 

That works fine as I can preview the image using the object ID as a reference, but I'd like to also display the file name in my card similar to how it is shown in the native UI.

 

Is that possible without making an API call to look up the name of the file?

 

AMichaels_0-1725551895625.png

 

0 Upvotes
1 Accepted solution
SteveHTM
Solution
Guide | Partner
Guide | Partner

CRM UI Extension - File Name Display?

SOLVE

@AMichaels - I belive the key is to use the file ID to obtain the details of the object using the API call https://api.hubapi.com/files/v3/files/{fileId}. I don't think there is any way to de-reference the object ID without an API call.

 

Good luck

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature

View solution in original post

1 Reply 1
SteveHTM
Solution
Guide | Partner
Guide | Partner

CRM UI Extension - File Name Display?

SOLVE

@AMichaels - I belive the key is to use the file ID to obtain the details of the object using the API call https://api.hubapi.com/files/v3/files/{fileId}. I don't think there is any way to de-reference the object ID without an API call.

 

Good luck

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature