Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use this object to retrieve, query, update, and delete the latest version of a document, but not a content pack, in a library or a file in Chatter.
2
votes
1
answer
3k
views
"Unable to create/update fields: VersionData" error when updating a ContentNote from Apex
I have some Apex code that inserts a ContentNote and the corresponding ContentDocumentLink. This works fine and the data can be viewed through the normal Salesforce UI.
But some further code that upd …
6
votes
2
answers
140
views
Workaround for the one record at a time trigger invocation when starting from Content Note
I hit this platform problem a while ago Why is this ContentNote trigger receiving 1 record at a time even though multiple records are being inserted?. But today I've hit it again and now I need a work …
12
votes
2
answers
3k
views
How to distinguish between ContentDocument and ContentNote?
getKeyPrefix());
and this:
System.debug(((Id) '069R00000002J0m').getSObjectType());
outputs ContentDocument. … As far as triggers and SObjectType based logic is concerned, ContentDocument is the type. …
8
votes
1
answer
599
views
How to detect a size change for a ContentDocument or a ContentNote in a trigger?
Both ContentDocument and ContentVersion have a ContentSize field documented to be:
Size of the document in bytes
but after adding debug code to check that field for both types for these events: … trigger ContentDocumentTrigger on ContentDocument (
before insert,
before update,
before delete,
after insert,
after update,
after delete
) { …
4
votes
1
answer
525
views
Why is this ContentNote trigger receiving 1 record at a time even though multiple records ar...
oldList 1 oldType ContentDocument newList 1 newType ContentDocument
12:38:57.1 (244778403)|CODE_UNIT_FINISHED|cve.ContentDocumentTrigger on ContentDocument trigger event AfterUpdate|__sfdc_trigger/cve … oldList 1 oldType ContentDocument newList 1 newType ContentDocument
12:38:57.1 (329862766)|CODE_UNIT_FINISHED|cve.ContentDocumentTrigger on ContentDocument trigger event AfterUpdate|__sfdc_trigger/cve …
0
votes
0
answers
391
views
Anyone using sfdx force:data:bulk:upsert to update Files (ContentDocument/ContentVersion)?
I have some small place-keeper files (ContentDocument/ContentVersion) loaded by some existing code but want to replace the content with the actual PDF/Video data. …
1
vote
2
answers
4k
views
How to have NetworkId (Community Id) logic working in both production and unit tests?
Some existing product code that creates ContentVersion instances is now being called from a community and the code fails with:
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, You do not have the
level …