4

I am developing a package based on salesforce DX which requires files (images) to be installed. I want to put them into a special library so they do not get mixed up with other content.

When I log into one of the scratch orgs (developer or enterprise edition), I am NOT able to successfully create a library on the Files tab with the "New Library". The button works and the dialog comes up so I can enter name, description, an icon and can hit "save".

Even though there is no error message but the green banner indicating that the new library has been created, the newly create library is NOT visible in LEX at all.

After some checking it turns out that in classic I can see the "library" but I get many confusing informations:

  1. It's only available on the "Manage Library : Select Library" pop-up on the right hand side but

  2. the library is not visible in the "My Libraries" section. and

  3. When I select the new library by the pop-up I get the message "You are not a library member. Viewing recent activity requires library membership." in the "Last activity" area on the libraries management page even though I am listed in the members section

I've checked/enabled all permissions with respect to "saleforce CRM content" but cannot get it to work.

Please advise on how to get libraries/files working corrently on sfdx scratch orgs.

Thx.

3

I'm currently running into the same issue, but I found a workaround to create an accessible Library via the Classic UI.

  1. Switch to Classic Experience
  2. Create a new User Group (add yourself)
  3. Create a new Library -> Save and Add Members -> add your User Group
|improve this answer|||||
1

Ive come across this encountring exactly the same issue. It is a real pain.

Been trying to get around it by inserting the content workspace record via anon apex and also querying it back without any joy, it is the same as what ones sees in lex in that I can insert the ContentWorkspace, right after doing that I have the id back in the apex. But I cant query it with SOQL.

ContentWorkspace myCW = new ContentWorkspace( name ='Apex Test6');
System.debug('myCW BEFORE INSERT = ' + myCW);
insert myCW;
System.debug('myCW AFTER INSERT= ' + myCW); // This does return an Id

But a query like:

SELECT Id, Name, Description, WorkspaceType,RootContentFolderId, DeveloperName FROM ContentWorkspace

Does not return it (but does return those made via the classic workaround mentioned above).

I dont know if it significant but did notice that the ones made in classic have amysterious RootContentFolderId populated but that field is not writeable via apex.

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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