Update: I managed to get the dialog to display but the implementation feels like a bug workaround. See update below.
How can I get this Add File Details dialog to display allowing the user to add file details when uploading a file?
It doesn't work for me in any of the locations the documentation says it will. The only place I haven't tried it yet is in a custom component that includes
lightning:fileUpload but it says it should work in Files home or the standard related list, which it just doesn't.
I've tested in a community with one custom field on Content Document, with and without a validation rule, with and without a required field, using the Combined Attachments related list, as well as the Files related list and none of them produce a UI similar to what is shown in the documentation.
Upon successful upload, it allows me to dismiss the modal. Upon unsuccessful upload (such as violating a required field check) I am presented with a message for "can't upload file" and the dismiss button of the modal changes to "Got It". At no point does it change to "Next" as I've seen described in other questions or "Save" as in the screenshot from the documentation.
Is there a toggle to allow this UI to be shown to a user?
I managed to get the dialog for Add File Details to appear (in LEX and Community interfaces) by adding a required field on the object as well as adding a
Record Type to the
Content Version object. Without both a required field and a RT, the user is not prompted to add details. They instead see the error message
Can't upload <filename>. as seen here:
Record Type is added to the
Content Version object, the Add File Details dialog is presented after the file is uploaded, as seen here:
- Is this working as designed?
- What if I don't want to
Content Versionobject? I only need the user to populate a couple of custom fields.