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
jstemperjstemper 

How do I? Retrieve AccountNumber based on a Task?

using the following code:

QueryResult qr = binding.query("Select t.AccountId, t.Account.AccountNumber from Task t");
SFDC.Enterprise.Task taskInfo = (SFDC.Enterprise.Task)qr.records[i];

how do I access the AccountNumber from within the task object?

I have tried taskInfo.Account.AccountNumber with no luck, AccountNumber does not eve appear as a valid property.

Any samples , examples or ideas?

Thanks
J
SuperfellSuperfell
taskInfo.Account.AccountNumber should work. if AccountNumber doesn't compile, then you may need to update your WSDL.
jstemperjstemper
That worked. Thanks for the suggestion.
I am curious why it wasn't in the first version of the Enterprise WSDL....

Thanks again
J