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
chentwchentw 

Any and type fields in SObject

I try to create a record using create() with the sample code. But there are no "type" or "Any" fields in the SObject. Does anyone know how to do it? Thanks.

 

account.type = "Account";

account.Any = acct;

 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
You're looking at partner WSDL sample code, but have imported the enterprise WSDL, either import the Partner WSDL, or use the enterprise WSDL samples.

All Answers

SuperfellSuperfell
You're looking at partner WSDL sample code, but have imported the enterprise WSDL, either import the Partner WSDL, or use the enterprise WSDL samples.
This was selected as the best answer
chentwchentw

Hi Simon,

Thanks for your response. But I don't see any sample code in "Web Services Devloper's Guide" using Enterprise WSDL. Could you point me to the documentation for that? Thanks.

chentwchentw
I think I found it. Thanks.
jobrienjobrien
Where is it?
chentwchentw

http://www.salesforce.com/us/developer/docs/api/index.htm. Then go to "getting started/quick start"/. The sample code is using Enterprise WSDL.

scorpstealsscorpsteals

I have the same issue. The quick start doesnt have example to create a new record. Can anybody point me to enterprise sample for creating a new record.

Thanks.

Message Edited by scorpsteals on 05-05-2009 12:10 PM