function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Siddharth LakhotiaSiddharth Lakhotia 

Problems while writting Test Class for Tasks

In Tasks..  Owner is a mandatory field.

But I am getting this error.  Field is not writeable: Task.Owner 

Assigner to is the field. Owner is the technical Name. its a lookup to User.

Can anybody suggest way

How do I get it corrected
Deepak Pandey 13Deepak Pandey 13
Replace owner to OwnerId.
Try This - https://developer.salesforce.com/forums?id=9060G0000005RgoQAE