---
schema_version: "1"
id: 8fbeac3b0a1d640c4c25cbfa5af1c7fbd8814c07ff3514b3841258129645d325
title: LookedUpFromActivity
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_lookedupfromactivity.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_lookedupfromactivity.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6f07a8a77effc060ae9d4f3a35320315d6d96a6a2c3638fbca90c0449d4a9623
description: This read-only object is displayed as a related list on an activity record (an event or a task); the list contains records that have custom lookup relationships from the activity to another object. This object is not queryable.
---
# LookedUpFromActivity

This read-only object is displayed as a related list on an activity record (an event or a task); the list contains records that have custom lookup relationships from the activity to another object. This object is not queryable.

## Supported Calls

describeSObjects()

## Fields

<table class="featureTable sort_table" summary="">


          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d1224641e67">Field Name</th>

              <th class="featureTableHeader  " id="d1224641e70">Details</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">AccountId</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">reference</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the ID of the related account, which is
                    determined as follows:<ul class="ul bulletList">
                      <li class="li">The account associated with the
                        <span class="keyword parmname">WhatId</span>, if it exists; or
                      </li>

                      <li class="li">The account associated with the
                        <span class="keyword parmname">WhoId</span>, if it exists;
                        otherwise
                      </li>

                      <li class="li"><samp class="codeph nolang">null</samp></li>

                    </ul>
                  </dd>

                  <dd class="dd">For information on IDs, see <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/field_types.htm#field_types" title="In addition to the primitive data types, the API defines the following data types for fields.">Field Types</a>
                  </dd>

                  <dd class="dd">This is a relationship field.</dd>



                  <dt class="dt dlterm">Relationship Name</dt>

                  <dd class="dd">Account</dd>



                  <dt class="dt dlterm">Relationship Type</dt>

                  <dd class="dd">Lookup</dd>



                  <dt class="dt dlterm">Refers To</dt>

                  <dd class="dd">Account</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">ActivityDate</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">date</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates one of the following:<ul class="ul bulletList">
                      <li class="li">The due date of a task</li>

                      <li class="li">The date of an event if <span class="keyword parmname">IsAllDayEvent</span> is set to <samp class="codeph nolang">true</samp>
                      </li>

                    </ul>
                  </dd>

                  <dd class="dd">This field has a time stamp that is always set to
                    midnight in the Universal Time Coordinated (UTC) time
                    zone. The time stamp doesn’t represent the time
                    of the activity; don’t attempt to alter it to
                    accommodate time zone differences. Label is
                    <span class="keyword parmname">Date</span>.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">ActivityDateTime</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">dateTime</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Aggregate, Filter, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Contains the event’s due date if the <span class="keyword parmname">IsAllDayEvent</span> flag is set to
                    <samp class="codeph nolang">false</samp>. <span class="ph" id="date_time_field_info"><a name="date_time_field_info"><!-- --></a> The time portion of this
                      field is always transferred in the Coordinated
                      Universal Time (UTC) time zone. Translate the time
                      portion to or from a local time zone for the user or
                      the application, as appropriate.</span> Label is
                    <strong class="ph uicontrol">Due Date Time</strong>.<p class="p">The value
                      for this field and
                      <span class="keyword parmname">StartDateTime</span> must match, or
                      one of them must be <samp class="codeph nolang">null</samp>.
                    </p>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">ActivitySubtype</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Restricted picklist, Sort</dd>



                  <dt class="dt dlterm">
                    <a name="activitysubtype_dlentry"><!-- --></a>Description
                  </dt>

                  <dd class="dd">
                    <span class="ph" id="activitsubtype_desc"><a name="activitsubtype_desc"><!-- --></a>Provides standard subtypes
                      to facilitate creating and searching for specific
                      activity subtypes. This field isn’t
                      updateable.</span>
                    <div class="p">Possible values are:<ul class="ul bulletList">
                        <li class="li">Task</li>

                        <li class="li">Email</li>

                        <li class="li">Call</li>

                        <li class="li">Event</li>

                        <li class="li">LinkedIn —Available in API version 56.0 and
                          later.</li>

                        <li class="li">List Email</li>

                      </ul>
                    </div>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">ActivityType</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Represents one of the following values: <samp class="codeph nolang">Call</samp>, <samp class="codeph nolang">Email</samp>, <samp class="codeph nolang">Meeting</samp>, or <samp class="codeph nolang">Other</samp>. Label is
                    <span class="keyword parmname">Type</span>. These are default values,
                    and can be changed.
                  </dd>


                </dl>

                <p class="p"><span class="keyword parmname">ActivityType</span> is the union of
                  <span class="keyword parmname">TaskType</span> and
                  <span class="keyword parmname">EventType</span>. If the same activity appears
                  in both dynamic picklists, duplicate activities appear.
                </p>

                <p class="p"><span class="keyword parmname">TaskType</span> and <span class="keyword parmname">EventType</span>
                  can each have a <samp class="codeph nolang">Call</samp> type.
                  Internally, they are distinct from each other.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">CallDisposition</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Represents the result of a given call; for example,
                    “we’ll call back,” or “call
                    unsuccessful.” Limit is 255 characters.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">CallDurationInSeconds</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">int</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Duration of the call in seconds.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">CallObject</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Name of a call center. Limit is 255 characters.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">CallType</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Restricted picklist, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The type of call being answered: Inbound, Internal, or
                    Outbound.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">CompletedDateTime</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">dateTime</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The date and time the task was saved with a Closed
                    status. <ul class="ul bulletList">
                      <li class="li">For insert, if the task is saved with a Closed
                        status the field is set. If the task is saved with
                        an Open status the field is set to NULL.</li>

                      <li class="li">For update, if the task is saved with a new
                        Closed status, the field is reset. <p class="p">If the task
                          is saved with a new non-closed status, the field
                          is reset to NULL. </p>
                        <p class="p">If the task is saved with
                          the same closed status (that is, unchanged) there
                          is no change to the field. </p>
                      </li>

                    </ul>
                    <div class="box message info">
                      <div class="inner">
                        <div class="bd">
                          <div class="media">
                            <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png" alt="Note">
                            <div class="mediaBd">
                              <h4 class="mbs">Note</h4>
                              <p>The status is a dynamic enum. If the Closed
                                mapping is changed it won’t cause an update of
                                existing tasks. Only new insert/update operations
                                are affected.</p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">Description</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">textarea</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Nillable</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Contains a description of the event or task. Limit is 32
                    KB.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">DurationInMinutes</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">int</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the duration of the event or task.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">EndDateTime</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">dateTime</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the end date and time of the event or task.
                    Available in versions 27.0 and later. This field is
                    optional, depending on the following:<a name="DurationConditions"><!-- --></a>
                    <ul class="ul bulletList" id="DurationConditions">
                      <li class="li">If <span class="keyword parmname">IsAllDayEvent</span> is true, you can supply a value for either
                        <span class="keyword parmname">DurationInMinutes</span> or
                        <span class="keyword parmname">EndDateTime</span>. Supplying values
                        in both fields is allowed if the values add up to
                        the same amount of time. If both fields are
                        <samp class="codeph nolang">null</samp>, the
                        duration defaults to one day.
                      </li>

                      <li class="li">If <span class="keyword parmname">IsAllDayEvent</span> is false, a value must be supplied for either
                        <span class="keyword parmname">DurationInMinutes</span> or
                        <span class="keyword parmname">EndDateTime</span>. Supplying values
                        in both fields is allowed if the values add up to
                        the same amount of time.
                      </li>

                    </ul>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">IsAllDayEvent</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">If the value of this field is set to <samp class="codeph nolang">true</samp>, then
                    the activity is an event spanning a full day, and the
                    <span class="keyword parmname">ActivityDate</span> defines the date
                    of the event. If the value of this field is set to
                    <samp class="codeph nolang">false</samp>, then the
                    activity may be an event spanning less than a full day,
                    or it may be a task. The default value of this field is
                    <samp class="codeph nolang">false</samp>. Label is
                    <span class="keyword parmname">All-Day Event</span>.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">IsClosed</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates whether a task is closed
                    (<samp class="codeph nolang">true</samp>)
                    or not closed (<samp class="codeph nolang">false</samp>). The default value of this field is
                    <samp class="codeph nolang">false</samp>. This field is set
                    indirectly by setting <span class="keyword parmname">Status</span> on the
                    task—each picklist value has a corresponding
                    <samp class="codeph nolang">IsClosed</samp> value.
                    Label is <span class="keyword parmname">Closed</span>.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">IsHighPriority</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates a high-priority task.
                    The
                    default value of this field is <samp class="codeph nolang">false</samp>.
                    This field is derived from the
                    <span class="keyword parmname">Priority</span> field.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">IsReminderSet</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates whether a reminder is set for an activity (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).
                    The default value of this field is <samp class="codeph nolang">false</samp>.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">IsTask</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">If the value of this field is set to <samp class="codeph nolang">true</samp>, then
                    the activity is a task; if the value is set to <samp class="codeph nolang">false</samp>, then the
                    activity is an event.
                    The
                    default value of this field is <samp class="codeph nolang">false</samp>.
                    Label is
                    <span class="keyword parmname">Task</span>.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">IsVisibleInSelfService</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">If the value of this field is set to <samp class="codeph nolang">true</samp>, then
                    the activity can be viewed in the self-service
                    portal.
                    The default value of this field is <samp class="codeph nolang">false</samp>. Label is
                    <span class="keyword parmname">Visible in Self-Service</span>.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">Location</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">If the activity is an event, then this field represents
                    the location of the event. If the activity is a task,
                    then the value is <samp class="codeph nolang">null</samp>.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">OwnerId</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">reference</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the ID of the user or group who owns the
                    activity.</dd>

                  <dd class="dd">This is a polymorphic relationship field.</dd>



                  <dt class="dt dlterm">Relationship Name</dt>

                  <dd class="dd">Owner</dd>



                  <dt class="dt dlterm">Relationship Type</dt>

                  <dd class="dd">Lookup</dd>



                  <dt class="dt dlterm">Refers To</dt>

                  <dd class="dd">Calendar, Group, User</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">Priority</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the priority of a task, such as high, normal, or
                    low.
                    The default value of this field is <samp class="codeph nolang">Normal</samp>.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">ReminderDateTime</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">dateTime</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Represents the time at which a reminder is scheduled to
                    fire if <span class="keyword parmname">IsReminderSet</span> is set to
                    <samp class="codeph nolang">true</samp>. If
                    <span class="keyword parmname">IsReminderSet</span> is set to <samp class="codeph nolang">false</samp>, then either the
                    user has deselected the reminder checkbox in the user
                    interface or the reminder has already fired at the time
                    indicated by the value.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">StartDateTime</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">dateTime</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the start date and time of the event.
                    Available in versions 13.0 and later.</dd>

                  <dd class="dd">The <span class="keyword parmname">StartDateTime</span> field contains
                    the event start date. </dd>

                  <dd class="dd">However, if the event’s
                    <span class="keyword parmname">IsAllDayEvent</span> flag is set to
                    <samp class="codeph nolang">true</samp>
                    (indicating an all-day event), then the time stamp in
                    the <span class="keyword parmname">StartDateTime</span> field is always
                    set to midnight in the Coordinated Universal Time (UTC)
                    time zone. Don’t attempt to alter the time stamp to
                    account for any time zone differences.
                  </dd>

                  <dd class="dd">If the event’s <span class="keyword parmname">IsAllDayEvent</span> flag
                    is set to <samp class="codeph nolang">false</samp>,
                    then you must translate the time portion of the time
                    stamp in the <span class="keyword parmname">StartDateTime</span> field to
                    or from a local time zone for the user or the
                    application, as appropriate, and the translation must be
                    in the Coordinated Universal Time (UTC) time zone.</dd>

                  <dd class="dd">If this field has a value, then
                    <span class="keyword parmname">ActivityDate</span> and
                    <span class="keyword parmname">ActivityDateTime</span> either must be
                    <samp class="codeph nolang">null</samp> or must
                    match the value of this field.
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">Status</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the current status of a
                    task.
                    The default value of this field is <samp class="codeph nolang">Not
                      Started</samp>. Each predefined
                    status field sets a value for
                    <span class="keyword parmname">IsClosed</span>.<div class="p">Possible
                      values are:<ul class="ul bulletList">
                        <li class="li">Completed</li>

                        <li class="li">Deferred</li>

                        <li class="li">In Progress</li>

                        <li class="li">Not Started</li>

                        <li class="li">Waiting on someone else</li>

                      </ul>
                    </div>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">Subject</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">combobox</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Contains the subject of the task or event.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">WhatId</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">reference</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The <span class="keyword parmname">WhatId</span> represents nonhuman objects such as accounts,
                    opportunities, campaigns, cases, or custom objects.
                    <span class="keyword parmname">WhatId</span>s are polymorphic.
                    Polymorphic means a <span class="keyword parmname">WhatId</span> is
                    equivalent to the ID of a related object. The label
                    is <span class="keyword parmname">Related To ID</span>.
                  </dd>

                  <dd class="dd">This is a polymorphic relationship field.</dd>



                  <dt class="dt dlterm">Relationship Name</dt>

                  <dd class="dd">What</dd>



                  <dt class="dt dlterm">Relationship Type</dt>

                  <dd class="dd">Lookup</dd>



                  <dt class="dt dlterm">Refers To</dt>

                  <dd class="dd">Account, Accreditation, AssessmentIndicatorDefinition,
                    AssessmentTask, AssessmentTaskContentDocument,
                    AssessmentTaskDefinition, AssessmentTaskOrder, Asset,
                    AssetRelationship, AssignedResource, Award,
                    BoardCertification, BusinessLicense, BusinessMilestone,
                    BusinessProfile, Campaign, CareBarrier,
                    CareBarrierDeterminant, CareBarrierType,
                    CareDeterminant, CareDeterminantType, CareDiagnosis,
                    CareInterventionType, CareMetricTarget, CareObservation,
                    CareObservationComponent, CarePgmProvHealthcareProvider,
                    CarePreauth, CarePreauthItem, CareProgram,
                    CareProgramCampaign, CareProgramEligibilityRule,
                    CareProgramEnrollee, CareProgramEnrolleeProduct,
                    CareProgramEnrollmentCard, CareProgramGoal,
                    CareProgramProduct, CareProgramProvider,
                    CareProgramTeamMember, CareProviderAdverseAction,
                    CareProviderFacilitySpecialty,
                    CareProviderSearchableField, CareRegisteredDevice,
                    CareRequest, CareRequestDrug, CareRequestExtension,
                    CareRequestItem, CareSpecialty, CareSpecialtyTaxonomy,
                    CareTaxonomy, Case, CommSubscriptionConsent,
                    ContactEncounter, ContactEncounterParticipant,
                    ContactRequest, Contract, CoverageBenefit,
                    CoverageBenefitItem, CreditMemo, DelegatedAccount,
                    DocumentChecklistItem, EnrollmentEligibilityCriteria,
                    HealthcareFacility, HealthcareFacilityNetwork,
                    HealthcarePayerNetwork, HealthcarePractitionerFacility,
                    HealthcareProvider, HealthcareProviderNpi,
                    HealthcareProviderSpecialty, HealthcareProviderTaxonomy,
                    IdentityDocument, Image, IndividualApplication, Invoice,
                    ListEmail, Location, MemberPlan, Opportunity, Order,
                    OtherComponentTask, PartyConsent, PersonLifeEvent,
                    PlanBenefit, PlanBenefitItem, ProcessException,
                    Product2, ProductItem, ProductRequest,
                    ProductRequestLineItem, ProductTransfer, PurchaserPlan,
                    ReceivedDocument, ResourceAbsence, ReturnOrder,
                    ReturnOrderLineItem, ServiceAppointment,
                    ServiceResource, Shift, Shipment, ShipmentItem,
                    Solution, Visit, VisitedParty, VolunteerProject,
                    WorkOrder, WorkOrderLineItem</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d1224641e67" data-title="Field Name"><span class="keyword parmname">WhoId</span></td>

              <td class="entry" headers="d1224641e70" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">reference</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic.
                    Polymorphic means a WhoId is equivalent to a
                    contact’s ID or a lead’s ID. The label is
                    <span class="keyword parmname">Name ID</span>.
                  </dd>

                  <dd class="dd">This is a polymorphic relationship field.</dd>



                  <dt class="dt dlterm">Relationship Name</dt>

                  <dd class="dd">Who</dd>



                  <dt class="dt dlterm">Relationship Type</dt>

                  <dd class="dd">Lookup</dd>



                  <dt class="dt dlterm">Refers To</dt>

                  <dd class="dd">Contact, Lead</dd>


                </dl>

              </td>

            </tr>

          </tbody>

        </table>

## Usage

Query activities related to an object

1. Optionally, issue a describe call against the object whose activities you wish to query, to get a suggestion of the correct SOQL to use.
2. Issue a SOQL relationship query with a main clause that references the object, and an inner clause that references the activity custom lookup relationship; for example:
    
    SELECT id, name, 
    (SELECT id, subject from sponsoredact\_\_r) 
    FROM Contact 
    
    In this example sponsoredact\_\_r is a user defined relationship list.

The user interface enforces sharing rules, filtering out related-list items that a user doesn’t have permission to see.

The following restrictions on users who don’t have “View All Data” permission help prevent performance issues:

- In the main clause of the relationship query, you can reference only one record. For example, you can’t filter on all records where the account name starts with ‘A’; instead, you must reference a single account record.
- In the inner clause of the query, you can’t use WHERE.
- In the inner clause of the query, you must specify a limit of 500 or fewer on the number of rows that are returned in the list.
- You must sort on ActivityDate in descending order and LastModifiedDate in descending order; you can display nulls last. For example: ORDER BY ActivityDate DESC NULLS LAST, LastModifiedDate DESC.