You need to sign in to do that
Don't have an account?

INVALID_CROSS_REFERENCE_KEY????Pleaseeee help me understand this
My test coverage is 100% but average is 86% with 1 failure...
I dont understand this error:
System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record Type ID: id value not valid for the users profile: {0}: [RecordTypeId]
I do not understand ...
Thank you for the help... I did check the Profile setting which is System Admin. And I made all recordtypes available for me, making the recordtype I am using the default.
Should I just make it Master in the settings of the profile for that object recordtype?
Thanks
MMA
I don't think that should matter - so long as it is available, the test should be able to reference it
MMA_FORCE, I am currently trying to solve that problem now, only I do not see where you made it accessible for system user on recordtypes... If you could help me out I'd greatly appreciate it.
Thanks,
Kyle
I am trying to upsert Cases. One of many columns is 'OwnerId' and one is 'RecordTypeId'. All of them fail with the error message:
Case Record Type: id value not valid for the users profile: 012T00000000VfykAE
The user has a profile which has this specified recordtype available in his profile (record type settings).
I have upserted several other objects with no problem. The only difference that I can think of is that the Case object don't have an owner the same way as for example the Opportunity. For a case you specifiy OwnerId, but for an Opportunity you can point out an external field on the owner record (User).
Any idea?
Thanks!
BR / Niklas
Greetings!
This error is occurred due to wrong id is using inside the record type and may be login user has not access to that record type.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi