Skip to main content

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.

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?


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.


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


Glad you got this figured out.