6

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?

1 Answer 1

12

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.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .