• Ashwin sfdc 3
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
getting "invalid cross reference id" error on running the below code in test class .

@isTest 
public class TestForceForecasting {
    static testMethod void insertNewUser() {
       
       User userToCreate = new User();
       
       userToCreate.FirstName = 'Davidsh';
       userToCreate.LastName  = 'Liush';
       userToCreate.Email     = 'dashwinsfdc99@gmail.com';
       userToCreate.Username  = 'sfdc-shdreamer@gmail.com';
       userToCreate.Alias     = 'fatty';
      userToCreate.TimeZoneSidKey  = 'GMT';
       userToCreate.LocaleSidKey  = 'en_US';
       userToCreate.EmailEncodingKey  = 'UTF-8';
       userToCreate.LanguageLocaleKey = 'en_US';
        userToCreate.ProfileId='00e28000005Mf8h';
       insert userToCreate;
       
       }
       }