We have created several
I am building a class to insert them.
First I tried my usual approach:
Asset myAsset = new Asset( Name = 'Test', RecordType = new Recordtype (Name = 'myRecordType'), Status = 'active' );
Which gave me:
Error: Invalid Field RecordType for sObject Asset
Darn, I thought, so let's use an Id.
Asset myAsset = new Asset( Name = 'Test', RecordTypeId = '012 ...'), Status = 'active' );
Invalid Field RecordTypeId for sObject Asset
I am at loss now. How do I insert an
Asset with a
RecordType when I can neither use
RecordTypeId on this object?
Is this a known issue?
Assets didn't have
RecordTypes from the beginning, so maybe I am missing something?