New answers tagged

1 vote

Creating attachment csv for visualforcepage in a test class

ReadFromFile() is an instance method, not a static method (because the method does not have the static keyword in its definition). To call instance methods, you need an instance of your class. So the ...
  • 52.1k
2 votes

Coverage Code always 0%

Few things to consider here: You are already storing the user's profile Id in the variable currentUserProfileId, either user that in the query or don't store it in the variable at all. Currently ...
1 vote

Coverage Code always 0%

You are trying to update an Object that has not been inserted yet and has no Salesforce Id. I am surprised you are not getting an error stating that. You need to insert your OBJ__c record first, then ...
0 votes

Error: Opportunity must have a primary quote in order to create an order.: [] - SBQQ CPQ Test class

An Order can be created and linked to an Opportunity. It can only be linked to a Quote when the Quote is Primary. Set ord.SBQQ__Quote__c = Null; The test should run.
  • 1

Top 50 recent answers are included