We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

Anytime you deploy or validate a change set, you can specify what tests you'd like to run. There's a quick read about it here: Since you're not deploying any code changes, the Default or Run local tests options should validate the changeset properly without having to run all the tests in your org.


0

Try to instantiate the class directly: AccountLocation accloc = new AccountLocation(); accloc.getAccount(); //For AccountLocation.getAccount(); You should be able to access the wrapper Location class with Location loc = new Location(); loc.latitud = 96.23040;


0

With SFDX CLI, we can use the below query to get all test class names in the org: sfdx force:data:soql:query --query="SELECT Id,Name,SymbolTable FROM ApexClass WHERE NamespacePrefix = ''" --usetoolingapi --targetusername=prod --json | jq '.result.records[] | select(.SymbolTable != null) | select(.SymbolTable.methods[].annotations[].name == "IsTest")' ...


2

Your issue is on this line: l.Next_Inspection_Date= Month()+'/15/'+Year(); You have missing __c in the field name. It should be written as one or other as below. Assuming you are using month() and year() methods from Date class on a date variable: Date myDate = date.newInstance(2019, 10, 29); l.Next_Inspection_Date__c = myDate.month() + '/15/' + myDate....


0

Your objective is a little misguided relative to the structure of Apex unit test classes and methods. A unit test class is little more than a container, whose scope can be made useful to you - you can use the class to group related unit tests, and associate them with a @testSetup data factory method they use in common to perform setup prior to running the ...


1

Your code looks mostly fine to me. I think the only way you could get this error is if you somehow had a null in your oppIds set. I do see that you're doing null checks before adding an id into your set, but there's one line where you're not doing a null check. In the following code: public void oppUpdate(List<OpportunityLineItem> oppLists,Map<Id,...


Top 50 recent answers are included