You need to sign in to do that
Don't have an account?
Jamsie
Create new RecordType and assign to custom object
Hi there,
I have built a trigger (on insert) for a custom object (Mail Item) that sets the owner to be a particular queue depending on the recordtype selected during creation.
I am now trying to write the test class. My problem is that I cannot work out how to create a new record type and assign it to my test created Mail Item object.
I can't rely upon a particular record type being in the system so cannot run a query on the record types.
Any help is much appreciated.
Thanks,
James.
Hello Jamsie,
If i understood correctly you have a Custom Object "Mail Item" and another custom object "type" , is that correct?
if so , in your test method create a new TYPE record (it will only exist within the test method) and create a mail of that type.
Something along the lines of :
Im not sure i understand the problem completely , could you explain a bit more if this was not what you needed?
Let me know if this helped you,
Gaston.