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 

Enterprise.wsdl, Task, returns more fields then the Query expression called for

When I make a webservice call to QueryAll Tasks ("Select AccountID FROM Task") I get both the AccountID and the Account reference fields. Is there a way to not bring back the Account field?

 

TIA

 

 

J

SuperfellSuperfell
I wasn't able to reproduce this, do you have a capture of the actual SOAP request/response that shows this?
jstemperjstemper
The Query I am using is

Select Id, WhoId, WhatId, Subject, ActivityDate, Status, Priority, OwnerId, Description, Type, IsDeleted, AccountId, IsClosed, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, IsArchived, CallDurationInSeconds, CallType, CallDisposition, CallObject, ReminderDateTime, IsReminderSet, LastIntegrationDate__c, Amount__c, Integration_Conflict__c, Force_Integration__c, LegacySeqn__c, SF_IMIS_TS_Status__c, Send_Conflict_to_iMIS__c, Send_Conflict_ID__c FROM Task

This is the XML that is returned:

 

<?xml version="1.0"?> <QueryResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <done xmlns="urn:enterprise.soap.sforce.com">false</done> <queryLocator xmlns="urn:enterprise.soap.sforce.com">01gQ0000000FHFbIAO-1000</queryLocator> <records xmlns:q1="urn:sobject.enterprise.soap.sforce.com" xsi:type="q1:Task" xmlns="urn:enterprise.soap.sforce.com"> <q1:Id>xxxxxxx000gLDgdEAG</q1:Id> <q1:Account xsi:nil="true" /> <q1:AccountId>xxxxxxx000PObPEAA1</q1:AccountId> <q1:ActivityDate>2008-03-17</q1:ActivityDate> <q1:Amount__c>0</q1:Amount__c> <q1:Attachments xsi:nil="true" /> <q1:CallDisposition xsi:nil="true" /> <q1:CallObject xsi:nil="true" /> <q1:CallType xsi:nil="true" /> <q1:CreatedBy xsi:nil="true" /> <q1:CreatedById>xxxxxxxx001A1aTAAS</q1:CreatedById> <q1:CreatedDate>2008-05-08T18:21:05Z</q1:CreatedDate> <q1:Description>Blah Blah Blah</q1:Description> <q1:Force_Integration__c>false</q1:Force_Integration__c> <q1:Integration_Conflict__c>false</q1:Integration_Conflict__c> <q1:IsArchived>false</q1:IsArchived> <q1:IsClosed>false</q1:IsClosed> <q1:IsDeleted>true</q1:IsDeleted> <q1:IsReminderSet>false</q1:IsReminderSet> <q1:LastIntegrationDate__c>2009-03-24T02:31:10Z</q1:LastIntegrationDate__c> <q1:LastModifiedBy xsi:nil="true" /> <q1:LastModifiedById>xxxxxx00001AzP2AAK</q1:LastModifiedById> <q1:LastModifiedDate>2009-04-08T03:39:24Z</q1:LastModifiedDate> <q1:LegacySeqn__c>50031277</q1:LegacySeqn__c> <q1:Owner xsi:nil="true" /> <q1:OwnerId>xxxxxx00001AF4GAAW</q1:OwnerId> <q1:Priority>Normal</q1:Priority> <q1:RecurrenceActivityId xsi:nil="true" /> <q1:RecurrenceInstance xsi:nil="true" /> <q1:RecurrenceMonthOfYear xsi:nil="true" /> <q1:RecurrenceTimeZoneSidKey xsi:nil="true" /> <q1:RecurrenceType xsi:nil="true" /> <q1:RecurringTasks xsi:nil="true" /> <q1:SF_IMIS_TS_Status__c>TRUE</q1:SF_IMIS_TS_Status__c> <q1:Send_Conflict_ID__c xsi:nil="true" /> <q1:Send_Conflict_to_iMIS__c>false</q1:Send_Conflict_to_iMIS__c> <q1:Status>Not Started</q1:Status> <q1:Subject>Email: Agent Program</q1:Subject> <q1:SystemModstamp>2009-04-08T03:39:24Z</q1:SystemModstamp> <q1:Type>Email</q1:Type> <q1:What xsi:nil="true" /> <q1:WhatId>00170000xxxxxxEAA1</q1:WhatId> <q1:Who xsi:nil="true" /> <q1:WhoId>00370000xxxxxxpAAN</q1:WhoId> </records> <size xmlns="urn:enterprise.soap.sforce.com">1</size> </QueryResult>

I've obfuscated some of the ID data.

 

I wasn't able to catch the request/response messages (long story).

 

TIA

 

J

jstemperjstemper
I also noticed that it returned a series of Recurrence fields that I didn't query for either.
SuperfellSuperfell
Where are you getting this xml from? we don't use namespace prefixes like q1. If you've reserialized the .NET object to xml, then the .NET xml serializer will include all the fields from the object.
jstemperjstemper

Yea I suppose I am reserializing the response. Duh. Sorry for taking up your time and thanks for the help.

 

J