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
Venk_ModelMetriVenk_ModelMetri 

Obtaining the parent Case for each task.

Hi,

 

I have a list of task objects and I'm trying to obtain the parent case for each such task object. Which field will help me? How is the parent child relationship maintained.

 

Thanks

Venk

DevAngelDevAngel

Hi Venk,

The what id is the id of the parent object.  Please note that a task can be parented by many different objects.  You'll need to inspect the the First 3 characters of the id to determine what kind of object the parent id referes to.  Here is a link to a technote that describes this.

 

http://www.sforce.com/us/resources/tn-1.jsp

 

If you need to find out what the prefixes are for other objects, you can get it from the id shown in the address bar of the browser from within the application.

Venk_ModelMetriVenk_ModelMetri

Dave,

Sorry about the confusion. What I meant to say is.

 

In my Java program, I write a query to obtain a task object. Which field in the task object will point me to the parent case id. (I need to find the case to which this task is associated with.)

 

Thanks

Venk

DevAngelDevAngel
Use the WhatId field.