I am trying to create a new user inside of Salesforce using nforce. However, every time I create the user I get the error: FIELD_INTEGRITY_EXCEPTION
stating Profile ID: id value of incorrect type: 005210026VpWAAUAQ4
or I receive INVALID_CROSS_REFERENCE_KEY
with a message of invalid cross reference id.
Which message I receive depends on the value I have set for profileId, 005210026VpWAAUAQ4
causes a FIELD_INTEGRITY_EXCEPTION
while 00e36000000YIZ6AAO
causes an INVALID_CROSS_REFERENCE_KEY.
Any ideas on how to solve the errors and create a new user?
var acc = nforce.createSObject('User');
acc.set('ProfileId', '00e36000000YIZ6AAO'); // throws error here
var q = "SELECT Id FROM User WHERE Username = 'swheeler@test.kanban'"
?select Id from Profile where Name = 'Standard User'
.