+ Start a Discussion

How to Create Archived Task/Event in Test Method

Anyone know how you can create a Task or Event in the archived state (IsArchived = true) in a test method?  The field is READ-ONLY so it can't be set when you create your test records and you should always be creating the test records you reference in your tests so is there a special trick to getting Task and Event records into this state from withing test methods?