I'm trying to create a "Log a Call" task with apex. I need this task to be marked as Closed but when I try to set the IsClosed field to true I'm getting the "Field not writable" error.
How can I work around this issue?
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_task.htm
There is a field called status in task. Setting this to the string 'Completed' solves the issue. No need to write this isClosed flag. This flag gets checked once task status is closed.
Status = 'Completed'
.
Commented
Jan 15, 2013 at 7:52