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
TesterInSkyTesterInSky 

does update() support 'nested' update?

by saying 'nested' update, I mean update the sub-sObject nested in a particular sOjbect.
 
For example, from the Enterprise WSDL, I see sObject 'Account' has a field named 'Contacts', which means that an Account may have a bunch of Contacts. So my question is, can I update a particular 'Account' sObject by not only update its simple string fields but also fields in its nested sObjects like 'Contacts' in a single SOAP Update call?
 
I came up with this question because I saw Salesforce supports Relationship Queries which can return data of a particular sObject and its nested sObjects.
 
Thanks!
werewolfwerewolf
No, it doesn't work that way.  With the straight up update call you'll have to update them separately, although nowadays you can write an Apex webService which takes in some data and does an update to a bunch of stuff in a single call.  So I guess I'll revise my answer to a "limited no."