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
LukeLuke 

sObject Missing

I updated the wsdl file in Visual Studio and now I get the error stating that sObject is missing?

It was there in my previous file, where did it go?

DevAngelDevAngel

Hi Luke,

If you are using VB, you need to edit the generated webreference.vb file.  Visual Studio does not properly delimit the Case and I think Event object references in the attributes the precede the sObject definition.  These need to be [Case] and [Event].

Cheers

LukeLuke

Thanks.  That worked.  It only messed up a declaration for sObject.  Events and Cases were parsed properly on VS.NET 2003.

GrahamGraham
I have the same problem with sObject, but I'm not clear on how to perform your fix...
hawaii guyhawaii guy

Hi there,

Did you ever find out the answer as to how to fix this?

 

Thanks

 

DevAngelDevAngel

Hi hawaii guy,

When you add the web reference in vb you get a declaration for an sObject like shown below.  The lines in red font are where the problems are.  You will need to modify these lines like this (notice the square brackets to indicate to VB that these are different from the keywords event and case).

System.Xml.Serialization.XmlIncludeAttribute(GetType([Event])), _

System.Xml.Serialization.XmlIncludeAttribute(GetType([Case])), _

 

Generated by Add/Update Web Reference:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:sobject.enterprise.soap.sforce.com"), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(UserRole)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(User)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Task)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Solution)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Scontrol)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(RecordType)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(QueueMember)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Queue)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Profile)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Product)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Pricebook)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Organization)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(OpportunityShareDefault)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(OpportunityLineItem)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(OpportunityHistory)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(OpportunityContactRole)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(OpportunityCompetitor)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Opportunity)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Note)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(MailmergeTemplate)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Lead)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(GroupMember)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Group)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(ForecastQuarterHistory)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(ForecastItem)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Folder)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Event)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Document)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Contact)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(CaseSolution)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(CaseHistory)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(CaseComment)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Case)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(CampainMember)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Campain)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(BusinessProcess)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Attachment)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(AccountShareDefault)), _

System.Xml.Serialization.XmlIncludeAttribute(GetType(Account))> _

Public MustInherit Class sObject

'<remarks/>

<System.Xml.Serialization.XmlElementAttribute("fieldsToNull")> _

Public fieldsToNull() As String

'<remarks/>

Public Id As String

End Class