I couldn't find the field name task(checkbox which differentiates task and event) On Task object.
2 Answers
That's because you're not looking at the Task
object. You're looking at the Activity History object.
From that documentation, the field name is isTask
. I'd imagine that the link to the actual Task
is stored in the WhatId
field.
The Task and Event records don't need an IsTask
field, because we know what they are. The ActivityHistory
and OpenActivity
objects contain both tasks and events, and are pseudo-objects, as they derive their values from two different tables. In normal database nomenclature, we'd call them "views", because they represent an underlying query of different objects.
-
thanks for the reply @sfdcfox I am creating a custom page where I need to show Activity History, there I need to show this Task. How can I do that.?– AnzarCommented Nov 12, 2016 at 15:26
-
1@Anzar The IsTask field is on the objects I've linked in my answer. If you're querying the Task or Event objects, you already know if it's a task or event. If you want to query ActivityHistory, you can do so as a sub-query, as in
select (select subject, istask from activityhistories) from account
(or whatever object you're querying).– sfdcfox ♦Commented Nov 12, 2016 at 15:28 -
thanks man...I have changed my code now I was thinking that checkbox is on task– AnzarCommented Nov 12, 2016 at 16:28