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
zero1578zero1578 

Parent Case - Related Case fields

I am trying to update Parent Case through an S-Control.  The field does not appear to be visible in the "Case" object, and I have looked through other objects in Apex Explorer and cant find it.  Has anyone found a way to populate this field through code? If so, what is the fields name and what object is it stored in?
 
Thanks.
Ron HessRon Hess
There should be a custom field that you created when you related a case to a case, that would be the field to use to update the "parent" case
zero1578zero1578

Thank you for your reply.

 

We do have a custom field that we had used for a similar purpose, but the field I am referring to is in the default field section, meaning it is included in SF.  This field is in the same section as Subject, Description, Owner etc.  The field name is 'Parent' but it does not appear to be available to me through code. :(

Ron HessRon Hess
i see it now.

it's hidden by default.
go into


and you should be able to make this visible, then access it via it's API name "Parent"
zero1578zero1578
Thanks again for looking into this.  I have the field enabled on the various page layouts, as well as Visible to all profiles, yet it does not show up in Apex Explorer or any other method I have tried to access the field 'Parent'.  Could there be anywhere else that needs a setting changed perhaps?  I am an administrator so I see pretty much everything already.
Ron HessRon Hess
if you look into the WSDL, you can see this field in the Case table
Code:
<element name="Parent" nillable="true" minOccurs="0" type="ens:Case"/>
<element name="ParentId" nillable="true" minOccurs="0" type="tns:ID"/>


if it does not show up in Apex Explorer, use another tool or go directly to the WSDL to see the field name, i suspect ParentId is actualy the field you want.
 

zero1578zero1578
thank you Ron.  The ParentId field setting did the trick.  I wish it was visible like it is supposed to be, but it works so I cant complain too much. :)
Divya GoelDivya Goel

Hi

I am facing the same problem but I am still not able to query the ParentCase field data in sfExplorer by useing Parent and ParentId. Please let me know how i can retrieve the data which get stored in ParentCase Field with api.

RogerHandRogerHand

No luck getting the Parent of a Case:

Code:

Select c.CaseNumber, c.ParentId
From Case c 


 Gives the error:

Code:

INVALID_FIELD - No such column 'ParentId' on entity 'Case'.

 

The following query gives the same error even though 'ParentId' isn't even in the query:

Code:

Select c.CaseNumber, (Select c2.CaseNumber FROM cases c2)
From Case c 


 
Is there some sample SOQL that can find the parent case? Or is this a bug?

Thanks in advance,

  -Roger

zero1578zero1578
How are you trying to access the field, where are you running that query?
 
Try to access the field through an S Control or the .Net or Java API, all of them worked for me so far.  Apex Explorer 8 does not show it and cant query it.  It might be an Enterprise vs Partner WSDL thing, but I dont know for sure.
RogerHandRogerHand
I should have mentioned that the error I got was from the Eclipse plugin explorer. It also didn't work with the .NET based explorer.
zero1578zero1578

Those all probably work off a similar or the same basic functions.  Try writing your own query and print the results using any of the API or internally in salesforce.com it should work. I dont know why it is not exposed to any of those tools, that drove me crazy too.