+ Start a Discussion
Velvett FoggVelvett Fogg 

Question on "Create"

I'm trying to create a new contact.  Im confused as to how the create call knows that I am attempting to create a new contact as opposed to creating a new account. 

result = sfdc.create(sObjects)  <-- that's my call for the create -->

 I am getting the following error:

Web service operation "create" with parameters {[[contact1.setlastName("St. Martin"), contact1.setphone("509-555-8302"), contact1.setfirstName("Duane"), contact1.setaccountID("00130000003mZ6ZAAU")]]} could not be found.


Have I built my Array incorrectly?



Message Edited by Velvett Fogg on 12-01-2004 10:27 AM

Message Edited by Velvett Fogg on 12-01-2004 10:31 AM


Hi, uh, Fogg,

Help me help you.  How do you create your array?  What language are you using?

Using the enterprise wsdl, the soap stack serializes each contact into an SObject.  When this happens, an type attribute is also generated for the SObject indicating what concrete type is represented by the SObject.

Using the partner wsdl, you actually specify the type in the type field of the SObject. 

Velvett FoggVelvett Fogg

Using ColdFusionMX


sObject[1]=contact1.setlastName("St. Martin");




result = sfdc.create(sObjects);



There's my code.  That generates the error I pasted in my first post.


Thanks much for your help Dave


PS  Any chance that ColdFusion gets it's "own" forum?  like PHP has?




Hi Fogg,

So, not knowing much about cold fusion,

It looks like you have a 4 element array - sObject, that you are setting all to the same contact, and whilst setting each element to the contact you are setting properties on the contact.  Then passing a variable named sObjects (not the plural versus the singular on the array) to the create command.

Am I interpreting this correctly?  If so, it doesn't look right.

I would think it would go something like this:

contact1.setlastName("St. Martin");




sObject[1] = contact1;

result = sfdc.create(sObject);



Velvett FoggVelvett Fogg
table.cfdump_wddx, table.cfdump_xml, table.cfdump_struct, table.cfdump_array, table.cfdump_query, table.cfdump_cfc, table.cfdump_object, table.cfdump_binary, table.cfdump_udf, table.cfdump_udfbody, table.cfdump_udfarguments { font-size: xx-small; font-family: verdana, arial, helvetica, sans-serif; cell-spacing: 2; } table.cfdump_wddx th, table.cfdump_xml th, table.cfdump_struct th, table.cfdump_array th, table.cfdump_query th, table.cfdump_cfc th, table.cfdump_object th, table.cfdump_binary th, table.cfdump_udf th, table.cfdump_udfbody th, table.cfdump_udfarguments th { text-align: left; color: white; padding: 5; } table.cfdump_wddx td, table.cfdump_xml td, table.cfdump_struct td, table.cfdump_array td, table.cfdump_query td, table.cfdump_cfc td, table.cfdump_object td, table.cfdump_binary td, table.cfdump_udf td, table.cfdump_udfbody td, table.cfdump_udfarguments td { padding: 3; background-color: ffffff; vertical-align : top; } table.cfdump_wddx { background-color: 000000; } table.cfdump_wddx th.wddx { background-color: 444444; } table.cfdump_xml { background-color: 888888; } table.cfdump_xml th.xml { background-color: aaaaaa; } table.cfdump_xml td.xml { background-color: dddddd; } table.cfdump_struct { background-color: 0000cc ; } table.cfdump_struct th.struct { background-color: 4444cc ; } table.cfdump_struct td.struct { background-color: ccddff; } table.cfdump_array { background-color: 006600 ; } table.cfdump_array th.array { background-color: 009900 ; } table.cfdump_array td.array { background-color: ccffcc ; } table.cfdump_query { background-color: 884488 ; } table.cfdump_query th.query { background-color: aa66aa ; } table.cfdump_query td.query { background-color: ffddff ; } table.cfdump_cfc { background-color: ff0000; } table.cfdump_cfc th.cfc{ background-color: ff4444; } table.cfdump_cfc td.cfc { background-color: ffcccc; } table.cfdump_object { background-color : ff0000; } table.cfdump_object th.object{ background-color: ff4444; } table.cfdump_binary { background-color : eebb00; } table.cfdump_binary th.binary { background-color: ffcc44; } table.cfdump_binary td { font-size: x-small; } table.cfdump_udf { background-color: aa4400; } table.cfdump_udf th.udf { background-color: cc6600; } table.cfdump_udfarguments { background-color: dddddd; cell-spacing: 3; } table.cfdump_udfarguments th { background-color: eeeeee; color: 000000; }
array (sObjects)
array (contact)
1setlastName("St. Martin")

That's what my Array "looks" like.
I am calling result = sfdc.create(sObjects);

I get that same error.

Sorry for being difficult.


Message Edited by Velvett Fogg on 12-01-2004 04:20 PM


Hi Fogg,

Well, I'm out of ideas.  We really need a coldfusion person to chime in here.

Velvett FoggVelvett Fogg

Thanks for trying Dave.  I spent most of yesterday researching this, and I think the trouble may be with the way CF handles Arrays.  If I come across a solution, I'll post it on these forums so that others can take advantage.



Thanks Fogg,

I guess I need to learn yet another development environment!

Hello Fogg,

i am not much of an expert with sForce but i use CFML/Java all day. I think whatever you want to do can be done in CFML.

can you give me a bit more detail as to what format you need to data to be in?

the example I saw was a structure with an array. is this correct or do you need to have to array alone?


Velvett FoggVelvett Fogg


Since posting this I've done some research. It seems that CF does not pass it's array's properly.  I have been told that I will have to use CF to call a Javaobject in order to make this work.  I've not done much with it after I found that out.