You need to sign in to do that
Don't have an account?
ServiceObjects
NewbieQ: Adding leads & Credco namespace?
I'm about 4 hours new to salesforce and need to create a script that inserts leads into a sf account. I found this thread that seems to have a pretty good bit of code that might do the trick, but I can't get the "Credco" namespace to be recognized.
In other words the line:
Credco.Web.SignUp.sforce.Lead sfLead = new Credco.Web.SignUp.sforce.Lead();
Results in this compiler error:
C:\Inetpub\wwwroot\SalesForce\WebForm1.aspx.cs(41): The type or namespace name 'Credco' could not be found (are you missing a using directive or an assembly reference?)
I've added the wsdl reference, but I can't find "Credco" anywhere within it. This is probably because Credco is something specific to that user? If so, can I customize the code to fit my needs, or could someone point me to a tutorial or a file within the sample package that demonstrates inserting leads rather than just displaying them? I noticed that Leads.aspx.cs in the asp .net sample package runs a Select query to get the leads data. I'm guessing I should run an Insert Into query to accomplish this?
In other words the line:
Credco.Web.SignUp.sforce.Lead sfLead = new Credco.Web.SignUp.sforce.Lead();
Results in this compiler error:
C:\Inetpub\wwwroot\SalesForce\WebForm1.aspx.cs(41): The type or namespace name 'Credco' could not be found (are you missing a using directive or an assembly reference?)
I've added the wsdl reference, but I can't find "Credco" anywhere within it. This is probably because Credco is something specific to that user? If so, can I customize the code to fit my needs, or could someone point me to a tutorial or a file within the sample package that demonstrates inserting leads rather than just displaying them? I noticed that Leads.aspx.cs in the asp .net sample package runs a Select query to get the leads data. I'm guessing I should run an Insert Into query to accomplish this?
Have you walked through the quickstart, it should get you up and running with what you want.
Also, they may have renamed it to Credco, but I couldn't find the "Web.SignUp.sforce.Lead" stuff in the reference either. Maybe I'm not looking in the right place.
Thanks for your suggestions. Sorry to post these simple questions, but I have to figure this out by tomorrow morning, so there isn't too much room for research time
I tried changing the namespaces in the example code to match the above format, and I think it may have worked, but now I'm getting an error on this line:
binding.SessionHeaderValue.sessionId = lr.sessionId;
I don't have access to that error right now from home, but I seem to recall that it was telling me I needed to instantiate an object. Is this true?
Message Edited by SODonnie on 09-27-2005 09:15 AM
Again, i would suggest you look at the quickstart code.
Thanks for suffering my newbie questions.