Hot answers tagged

27 votes
Accepted

ContentDocumentLink filter error on ContentDocumentID using IN clause

the solution is to add your keySet() from Map to a new Set() and use that in the query filter using IN: Ex: Set<Id> newSet = mapOfContentVersion.keySet(); [SELECT ContentDocumentID, ...
harish's user avatar
  • 286
10 votes

ContentDocumentLink filter error on ContentDocumentID using IN clause

I encountered the same error in my query for ContentDocumentLink records: "Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId ...
Dave Ries's user avatar
  • 131
9 votes

ContentDocumentLink filter error on ContentDocumentID using IN clause

This must be a recent update (this year), because I had code working filtering on a Set with no problem, and suddenly noticed today it no longer worked. I resolved the issue by first casting the Set ...
Charles Naccio's user avatar
7 votes

ContentDocumentLink filter error on ContentDocumentID using IN clause

In addition to @harish answer, the underlying problem is similar to using object.field notation as bind variables in dynamic SOQL - even though the use case is static SOQL For static SOQL - does not ...
cropredy's user avatar
  • 70.8k
7 votes
Accepted

How to share files uploaded in "Files" related list to Community Users

Files uploaded via this related list will only be visible to internal users, and this field is not editable. One thing you can do is post the file to the record via the Chatter publisher, and ...
citizen conn's user avatar
5 votes

Salesforce Files Vs Salesforce CRM Content

Hope you have gone through these differences before posting the question. Refer Differences Between Files, Salesforce CRM Content, Salesforce Knowledge, Documents, and Attachments CRM Content needs ...
Santanu Boral's user avatar
5 votes

How to get ContentVersion Public Link?

I'm still trying to figure this out myself, but I believe what you are looking for is the DistributionPublicUrl field on the ContentDistribution object. I think the query would be something like: ...
tlfu's user avatar
  • 952
5 votes
Accepted

How to fetch contentNote records as per the contact record?

There exists a relation between ContentNote and ContentDocumentLink. In order to get the ContentNote or ContentVersion, there are different ways of achieving it. Using 2 SOQL's You will have to ...
Vijay Ganji's user avatar
  • 6,586
5 votes
Accepted

Find the name of an image based on its URL in Marketing Cloud

By far, the easiest method to determine the name from the image URL is to enable Predictive File URLs. If your solution needs to account for images uploaded before the enablement of that feature, or ...
Jason Hanshaw's user avatar
4 votes
Accepted

Background images in Content Builder

No, it's not possible in SFMC. There are several ways to approach this. The best way I've seen is to break up the email components into Content Areas. You could do something like this: Upload ...
Adam Spriggs's user avatar
  • 30.4k
4 votes

do all orgs have 'content' package requirements

It appears that Content is available in all editions. However, it may not be enabled in some orgs. Therefore, your "pre-installation instructions" will need to include the need to go to Setup and ...
sfdcfox's user avatar
  • 487k
4 votes
Accepted

Files with Content Delivery & Public Links as a CDN

You can programmatically create a public link from a ContentVersionId and then get the download URL like this: ContentDistribution publicLink = new ContentDistribution(ContentVersionId = ...
Aidan's user avatar
  • 13.6k
3 votes
Accepted

BeforeDelete Trigger on ContentDocumentLink object not firing

I know this is quite late response, I totally forgot about this question. Anyhow, just updating this question so that if anyone does encounter such an issue, he/she may find solace. I'm not sure if ...
Mahmood's user avatar
  • 5,969
3 votes

Salesforce Crm content general questions

First of all, from the screenshot you provided it looks like you are looking for Salesforce for Non-profit organization (free first 10 licenses and discounted after). In regard of your questions 1&...
o-lexi's user avatar
  • 3,094
3 votes
Accepted

How to make this sub query work

What you're trying to do is called a semi-join (or an anti-join if you use NOT IN). These are useful for gathering table A if it contains or does not contain some relational object (e.g. find all ...
drakored's user avatar
  • 2,698
3 votes
Accepted

How to create custom field in content object

For Salesforce Classic Step 1: In quick find box search for salesforce file Step 2: click on Field, you will be directed to this page Create your Custom Field..!!
Aarya Tiwary's user avatar
3 votes
Accepted

Is there an API that can be used to programitically regenerate previews

Salesforce support confirmed that at present there is no option to programmatically regenerate the previews. I was able to generate a Selenium script that iterated through all of my contentversionids ...
David Hickman's user avatar
3 votes
Accepted

Rating content files in Apex

It's ContentVersionRating object revealed by Salesforce in latest version 42.0. ContentVersionRating Represents a rating on a version of a file. This object is available in API version 42.0 ...
Ayub's user avatar
  • 3,483
3 votes

Cannot update contentDocumentId in contentDocumentLink

ContentDocumentId is of type reference and Properties are Create, Filter, Group, Sort. It is ID of the document which have been linked with any record. Note:- Once you create a ContentDocumentLink, ...
sanket kumar's user avatar
  • 15.2k
3 votes
Accepted

Real time dynamic emails

Looking at e.g. Movable Ink and other vendors is a good start, as the only supported feature in Marketing Cloud is Live Image, which can only replace an image based on a specific rule (e.g. show image ...
Lukas Lunow's user avatar
  • 21.1k
3 votes
Accepted

Content Distribution Records are not getting created

To enable Deliver Content from the library: Enable Content Delivery function for the org and Create Public links for the profile/permission set. Change to Classic Enter Setup Expand Customize->...
Jeremy Brown's user avatar
3 votes

Find the name of an image based on its URL in Marketing Cloud

I have found the most success to be using the REST API simple query with the like operator. The caveat being instead of using the whole URL, you use just the image name at the end. E.g. myimage.png ...
Gortonington's user avatar
  • 30.5k
2 votes

Can we use SOSL to search content libraries

Here is little experiment that I did for this , Uploaded a word document(14 pages long) in the Content Object . The next thing I did was to pick a very random word thats there in the document . Ran ...
Mohith Shrivastava's user avatar
2 votes
Accepted

Creating Library Subfolders using ContentFolder & ContentFolderLink

I did raise a Case with the Salesforce support team & the Tier 3 team confirmed that the create operation is not supported for ContentFolderLinks & although they were able to create 2 folders, ...
Alex S's user avatar
  • 2,296
2 votes
Accepted

Making the content in response as attachment

Attachment.Body is of type base64 so, as long as the source string is valid UTF-8, you can set this field using: myAttach.Body = Blob.valueOf(theXmlString); myAttach.Name = 'myfilename.xml';
cropredy's user avatar
  • 70.8k
2 votes

How to share files uploaded in "Files" related list to Community Users

As citizen conn pointed out you can use a trigger to edit the Visibility to enable community users to view the file. Here's is the exact trigger you'll want so when internal users upload documents, ...
ClarkBranson's user avatar
2 votes

How to share files uploaded in "Files" related list to Community Users

Replace YOUROBJECTAPI with your object api name and it will share only files uploaded on a that object trigger shareFilesWithCommunityUsers on ContentDocumentLink(before insert){ Schema....
sfdc's user avatar
  • 13.6k
2 votes
Accepted

Salesforce Crm content general questions

Are Salesforce Crm Content and Content Library one and the same? From this answer Libraries allow you to create and categorize content (files) in logical groups. We can have one ore more ...
brezotom's user avatar
  • 1,077
2 votes

Insert Content and link it programmatically using SOAP API

The Visibility field has affect if Communities are enabled. A visibility of AllUsers means both 'internal' uses and community users can see the file if they have access to the record, whereas a ...
Neil H.'s user avatar
  • 281
2 votes

Insert Content and link it programmatically using SOAP API

I used the Salesforce UI to add a File to an Opportunity. Then checked the resulting ContentDocumentLink records with SQOL. Select Id,LinkedEntityId,ContentDocumentId,IsDeleted,ShareType,Visibility ...
Daniel Ballinger's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible