function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
grandmastergrandmaster 

Problem creating a test class for AccountTeamMember

Kamatchi Devi SargunanathanKamatchi Devi Sargunanathan

Hi,

 

While writing test classes you should not directly give some id, means don't use Hardcode value of id.

 

Do the following and refer this u.id in inserting the accountTeamMember userID field, then run the test class again,

 

  user u = [select id,name from user where id=:UserInfo.getUserId() limit 1];

 

Hope this will help you...!

 

Please don't forget to give kudos by clicking on the Star icon and mark this as a solution, if this works out.