Hi, I'm having trouble finding any good examples of using coldfusion 8 to create a salesforce / force.com contact record. I'm using the Enterprise WSDL and I specifically don't want leads (at least the client doesn't), just contacts.
I've poked around and found a few soap examples because force seems to be ..net but this has been the only shining example I can find on logging in successfully. I'm having a hard time creating the right contact object to send to force.com. Here is the login example I found that works well. I'd like to expand this to create contacts.. any help is appreciated. <!--- Login ---> <cffunction name="SFLogin"> <cfargument name="userName" required="yes" type="string"> <cfargument name="password" required="yes" type="string"> <cfargument name="wsdl" required="yes" type="string"> <cfset sfdc = createObject("webservice","#wsdl#") /> <cfset result = sfdc.login("#ARGUMENTS.userName#","#ARGUMENTS.password#") /> <!--- create a SOAPHeaderElement called SessionHeader in the SforceService namespace: ---> <cfset authHeader = createObject("java","org.apache.axis.message.SOAPHeaderElement").init("Sforc eService", "SessionHeader") /> <!--- add (and populate) a text node called sessionId: ---> <cfset authHeader.addChildElement("sessionId").addTextNode(result.getSessionId()) /> <!--- set the entire soap header: ---> <cfset sfdc.setHeader(authHeader) /> <!--- change the endpoint URL to what was returned by the login method: ---> <cfset sfdc._setProperty("javax.xml.rpc.service.endpoint.address",result.getServerU RL()) /> <cfset result = sfdc.getUserInfo() /> <cfreturn sfdc> </cffunction> - Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313110 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4