All Questions
11 questions
1
vote
1
answer
389
views
ContentPublication Limit exceeded in Test Class?
Is the content publication limit applicable to test class as well? All i am doing on my test class is to create a contentversion record. It still says that ContentPublication Limit exceeded.
Does ...
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 ...
1
vote
0
answers
1k
views
Inserting Content Version via Community User in test class Failing
I think this is very straight forward I just can't figure out the issue behind it.
Error:
: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, You do ...
2
votes
1
answer
1k
views
Test Class for ContentDocumentLink causing Internal Salesforce Error
I have a test class that is inserting a ContentDocumentLink between a ContentNote (SNOTE) and a custom object. Everytime I try the insert it causes an Internal Salesforce Error. I have absolutely ...
0
votes
2
answers
833
views
Unable to access versionData from test class
I am facing an issue but I don't know what I'm doing wrong.
I'm writing a test class for a code which has this 2 lines:
public static Blob getPkpass(){
// more code here...
List<...
2
votes
1
answer
3k
views
Field not writable: ContentVersion.FileType
In the following test method:
static testMethod void testEmailWithAttachments() {
ContentVersion contentVersion = new ContentVersion();
contentVersion.FileType = 'Text';
...
6
votes
2
answers
6k
views
ContentVersion FileExtension
Does anyone know how I can change the FileExtension for a new ContentVersion in a test class?
Im currently trying to create a test class for my ContentDocumentLink Trigger, in which I have an if ...
1
vote
1
answer
45
views
What kind of test can I write to check the file?
I have a controller for VF Page. This code upload a profile's image (we can see it after that) and delete it. What kind of test can help me to check this file? I need to know, is it uploaded or not.
...
0
votes
2
answers
1k
views
Make the test work: File insert, check this File
This code is a controller for my VF Page. It inserts ContentVersion and ContentDocumentLink. After that a candidate field Photo__c take a ContentVersion.Id value. How to check it correctly?
Now ...
2
votes
2
answers
2k
views
Specify ContentSize when creating new ContentVersion in UnitTest
I used the post: Test class for contentdocumentlink as a model, however, when I attempt to define my own ContentSize for the ContentVersion document I receive:
Field is not writable: ContentVersion....
5
votes
0
answers
2k
views
ContentPublication Limit exceeded in Unit Test
I have Apex triggers on ContentDocument and ContentDocumentLink Sobject.
I wrote my Apex Unit Tests for those triggers and I was creating more then one Content Data record to test the Logic in Bulk.
...