Question

Add attachments to a detail

Hi, Is there a way to add the attachments detail to a detail (not to a section)?

Thanks,

Chani

Like 1

Like

6 comments

Yes, you can add attachments to a detail. You'll need to manually create the objects (Create an object named UsrYourEntityFile - your detail object name followed by File, parent File, add lookup column for your entity), then add the Attachments detail to the detail screen.

Yes, you can add the attachments detail to a detail. You basically just need to manually create the object, named "UsrYourEntity"+"File (as in UsrYourEntityFile) with parent "File" and add lookup column to the detail object (example, add lookup for UsrYourEntity). Then add the attachments detail to the detail page.

Ryan

(Sorry for dupe reply - the first one didn't show right away so posted again, now won't let me delete the dupe)

Ryan Farley,

Thank you for answer. 

I tried this before, I created an object called UsrOrderContractFile, parent object = File and added a lookup for the OrderContract. I then added a detail based on the UsrOrderContractFile object to my detail and changed the parent object of the detail's record page to FileDetailV2, like I saw in this article. (Was this not needed?)

Anyways, it didn't work, and the result in the UI was like a regular detail and not the attachment UI. 

Any ideas what I didn wrong?

Thanks so much!

First, make sure it's FileDetailV2 that you're using (I think there are a few "file" or "attachment" details registered, so make sure it's that one).

I think, if I remember correctly, you also need to add this to the methods of the detail page it's on:

getFileEntitySchemaName: function() {
	return "UsrMyEntityNameFile";
}

Obviously, replace that with the actual file object name. 

Also, I've been able to add the FileDetailV2 directly to my pages without issue and all works. IIRC if I create my own that inherits from FileDetailV2 it doesn't get the CSS needed without adding the styling yourself.

Ryan

Ryan Farley,

I added the code you gave me and still not working. Anything else you cab think of?

Thanks,

Chani

Show all comments