@istest private class Penalizacion_Memo_isTest {
@istest static void test_Memo(){
user u = new user();
u.MEMO__c=TRUE;
u.LastName = 'Test Code';
u.Email = '[email protected]';
u.Alias = 'Tcode';
u.Username = '[email protected]';
u.CommunityNickname = 'test12';
u.LocaleSidKey = 'en_US';
u.TimeZoneSidKey = 'GMT';
u.ProfileID = '00e36000000ao2F';
u.LanguageLocaleKey = 'en_US';
u.EmailEncodingKey = 'UTF-8';
insert u;
}
}
This is my code. I've already changed the username a couple of times and still receive the same error even though I'm absolutely positive there is no user with that username in any of our organizations.
Error:
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_USERNAME, Duplicate Username.
The username already exists in this or another Salesforce organization. Usernames must be unique across all Salesforce organizations. To resolve, use a different username (it doesn't need to match the user's email address). : [Username] Stack Trace: Class.Penalizacion_Memo_isTest.test_Memo: line 16, column 1