You need to sign in to do that
Don't have an account?
AlecS
Copy RecordType from Standard Object to A Custom Object
Whenever, I activate a Contract, a trigger is executed and creates a custom object called Invoice__c. I am able to copy all the values from Contract to Invoice__c EXCEPT for the RecordType.
RecordType is a standard field present in ALL objects. How can I copy the RecordType of Contract to the RecordType of Invoice__c? I just need this code.
Thanks.
HI Alec,
I
don't think you can, because part of the information of a recordtype is the SObject type - as this FDC Explorer pic shows....
I think you have to duplicate the record-type for your custom object, and then look it up by Description (or whatever other criteria), and then use that ID when running your trigger.
...But, if all you want to do is copy the record type from some other object (like an account, for ex.) you can create a lookup field on your custom object and insert the account record type there, so that you can create reports and such.