Unable to update custom fields on content version through Skuid

  • 1
  • Question
  • Updated 3 years ago
  • Answered
So you can add custom fields to ContentVersion Object through the Salesforce Admin menu. I can then load these fields into Skuid as expected, however, they are not available for edit and they do not respond to actions. From what I can read, they are supposed to be update-able by API. Can anyone think of a reason they would appear Read only in Skuid? I can alter them as expected in the Salesforce layout for Content, so it isn't a permission issue.... Any thoughts would be appreciated.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Raymond,

I'm having trouble replicating this issue in our dev org, but it may be that I don't properly understand the issue you are experiencing. I added a new custom field ("Text Field" in the screenshot below) to the Content Version object, added it to a Model on a Skuid page, and added that field to a Skuid Table that references the previously mentioned Model. After uploading a file, I'm able to change the value of this custom field without issue:



Am I trying to replicate the wrong thing, or are you not seeing the same behavior?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Thanks for looking into this. The difference is that my model is not based on the content version object. It is based on ContentDocumentLink object. Why, you ask? Because it allows me to create a better document management system. I use uploader component and set it to chatter feed. Uploader connects the chatter feed file to the currernt record in the model. That link is stored in the ContentDocumentLink object. I haven't seen a way to access the ContentDocumentLink "LinkedId" field from any other Content object as a parent or child, so I had to base my model on ContentDocumentLink object. From there I can acces fields in ContentDocument object which gives me access to LastPublishedVersion which is the current version in the ContentVersion Object. This is where I gain access to my custom fields. So, though the fields are read/write, I am guessing that dragging them through the ContentDocument Model is causing the problem.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I found a solution. I can use the ContentVersion object which allows for editing of Content custom fields. I can access the Linked Entity record name and ID through the "First Published Location" Field. I still can't access the LibraryId from the ContentVersion object. If you can figure out a way, that would be awesome. Thanks
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Glad you got this figured out.