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
JFraumeniJFraumeni 

HTTP 500 Error s, Cascading Deletions, 1:1 Relationships

Three distinct questions/observations that aren't really related. FYI I'm using the SOAP API 2.5.

1. Why is it that more often than not, if there is something wrong with a query, rather than get a SalesForce server-returned error message, I just get an HTTP 500 Error (Internal Server Error.) To name one example, if I perform a query looking for field "FirstName" from the "Contact" record, I get back all of my Contact's First Names, but if I perform the identical query but for "Name" instead (which does not exist in Contacts,) I do not get a InvalidFieldFault as documented, but the 500 error.

2. The documentation states that deleting a record will delete it's children automatically. However, in at least the case of parent and child Accounts, this is not the case (deleting a parent account only deletes the reference to that parent in the child.) The example used in the documentation (deleting a Case deleting its referenced CaseComment and CaseHistory) also does not end in a cascading delete. Which, if any, cases do trigger cascading deletes?

3. Is there the concept of pairs of records with strict 1:1 relationships in SalesForce?


Thank you very much, sorry for the range of questions. For future reference, do the moderators prefer splitting posts like these up into three separate posts?
I am guessing the answer to these is just that the documentation is not in sync with the implementation yet, but figured I'd post this at least as a bug report.

Thanks!


James Fraumeni
DevAngelDevAngel

Hi JFraumeni,

1.  Hmm... I consistently recieve an INVALID_FIELD fault response using .Net and Axis.  What client are you using.  You are correct in assuming that you should always be recieving a fault response.

2. The cascadeing delete will be fixed in the spring release (Mid April).

3.  I'm not sure about your question.  If you would like to expound please feel free.

JFraumeniJFraumeni
Thanks very much.
For 1., I'm using Pyhon's ElementSOAP interface, but, yeah, nothing more I can add there.

For 3., what I am asking is whether or not there are pairs of records (or the concept of such) in SalesForce where if one record exists, the other record must exist (and hence a cascading delete on either will delete both.)


James Fraumeni
JFraumeniJFraumeni
So, more information on #1. I mentioned both already, but to be clear, I'm not using a client, but rather writing a Python program sending requests to the SForce SOAP API version 2.5 via Python's ElementSOAP package. One example, which I actually was going to make another post asking what the error was is making updates. I can send the request:

<ns0:update ns1:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:partner.soap.sforce.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<sObjects ns2:type="ns3:Contact" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://www.w3.org/2001/XMLSchema">
<Id>
00330000002dIkIAAU
</Id>
<LastName>
PostFord
</LastName>
</sObjects>
</ns0:update>

And it works correctly and returns success being true. However, if I simply add an AccountId (the exact AccountId previously returned by a "retrieve" call on the Contact) as per the following:

<ns0:update ns1:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:partner.soap.sforce.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<sObjects ns2:type="ns3:Contact" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://www.w3.org/2001/XMLSchema">
<Id>
00330000002dIkIAAU
</Id>
<LastName>
PostFord
</LastName>
<AccountId>
00130000000gorOAAQ
</AccountId>
</sObjects>
</ns0:update>

The server sends back the afformentioned HTTP Error 500: Internal Server Error and no XML of any sort. (The AccountId used is valid, and calling retrieve on it returns the requested fields without problem.)


Thank you very much for the help, on this and my other posts.


James Fraumeni
james.fraumeni@activeprime.com

Message Edited by JFraumeni on 03-15-2004 10:54 AM