3

In a Test Class, I would like to set SeeAllData=false and then create a Predefined Case Team in the setup method for use in the Test Class. I can not find any documentation on this.

  • 1
    Can you share what have you tried so verify it? – Raul Feb 22 '18 at 15:20
  • @RahulSharma I haven't tried anything yet. I can't find the api name to attempt to create a predefined case team using apex. So I'm asking if it is even possible to do so. – george oster Feb 22 '18 at 15:23
3

The answer is yes, you can create a Predefined Case Team in an APEX Test Class. It is called CaseTeamTemplate.

CaseTeamTemplate myCaseTeam = new CaseTeamTemplate();
myCaseTeam.name = 'TestName';
myCaseTeam.description = 'Test Description';
insert myCaseTeam;

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_caseteamtemplate.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.