8

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?

https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_networks_files_custom_fields.htm

enter image description here

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?


Update:

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:

enter image description here

Once a Record Type is added to the Content Version object, the Add File Details dialog is presented after the file is uploaded, as seen here:

Step 1

enter image description here

Step 2

enter image description here

  1. Is this working as designed?
  2. What if I don't want to Record Type the Content Version object? I only need the user to populate a couple of custom fields.
1
  • Didn't work for me even adding a record type Feb 21 '20 at 9:20
0

Thanks @Mark Pond for this great description. I too found the only way to do this is to make the field Required. This was a problem for me as I only wanted the field to be displayed only for some users. Unfortunately fields on the ContentVersion do not allow for profile-level Read-Edit permissions.

The solution was to add a Default Field Value logic.

I made the field required and then using the Default Field value I set it to NA for the profiles that should not see this field and left the default blank for profiles that should see and populate the fields.

As a result the field displayed on the Next screen for those that should see it and Done for those that did not need to see the field on file upload.

https://help.salesforce.com/articleView?id=fields_useful_default_field_values.htm&type=5

Not the answer you're looking for? Browse other questions tagged or ask your own question.