mteece / salesforce-dotnet

Automatically exported from code.google.com/p/salesforce-dotnet
0 stars 0 forks source link

Create Orders #17

Open jmawebtech opened 8 years ago

jmawebtech commented 8 years ago

Hi,

I would like to create orders under the order tab in Salesforce, using your API. I have a few questions:

orders

  1. I cannot find the order object in my WSDL file. Am I using the right one?

enterprise.zip

  1. I assume I must make an order controller, like the Account controller?
mteece commented 8 years ago

@jmawebtech Thank you for diving into salesforce-dotnet. It has been awhile since I pulled this off of Google Code before they shut the hosting down. Feel free to fork and contribute too.

  1. As I recall you need to export your WSDL using the following https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm#choose_wsdl
  2. Make sure you add the WSDL file in Visual Studio. Keep note of the path to the file.
  3. You have to run the wsdl.exe as described in https://github.com/mteece/salesforce-dotnet#examples. What that does is it will generate a SforceService.cs file that will have described the objects to the CLR in Visual Studio. That way you can easily access them like POCO's. The SforceService.cs should appear as missing in Visual Studio and then after running wsdl.exe it should appear (or forcibly add it).
  4. You are correct, you need to make a controller for the specific SObject you want to access. This can be the built-in or custom objects. In your case an Order Controller.

I do remember that there were two options for the WSDL; a plain one and an enterprise one. I say try them both to see if it works.

For debugging I used a sandbox account, which did not have access at the time to the enterprise export of the WSDL. That may have changed. It has been some time.

jmawebtech commented 8 years ago

Add this code to the Gaiaware.Core project. It is the enterprise.WSDL with all the objects.

Joseph Anderson

Director, Customer Success

JMA Web Technologies, Inc.

P: (781) 330-0737

Web: http://www.jmawebtechnologies.com

Store: http://www.jmawebstore.com


From: Matthew Teece notifications@github.com Sent: Thursday, May 26, 2016 2:26:14 PM To: mteece/salesforce-dotnet Cc: Joseph Anderson; Mention Subject: Re: [mteece/salesforce-dotnet] Create Orders (#17)

@jmawebtechhttps://github.com/jmawebtech Thank you for diving into salesforce-dotnet. It has been awhile since I pulled this off of Google Code before they shut the hosting down. Feel free to fork and contribute too.

  1. As I recall you need to export your WSDL using the following https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm#choose_wsdl
  2. Make sure you add the WSDL file in Visual Studio. Keep note of the path to the file.
  3. You have to run the wsdl.exe as described in https://github.com/mteece/salesforce-dotnet#examples. What that does is it will generate a SforceService.cs file that will have described the objects to the CLR in Visual Studio. That way you can easily access them like POCO's. The SforceService.cs should appear as missing in Visual Studio and then after running wsdl.exe it should appear (or forcibly add it).
  4. You are correct, you need to make a controller for the specific SObject you want to access. This can be the built-in or custom objects. In your case an Order Controller.

I do remember that there were two options for the WSDL; a plain one and an enterprise one. I sat try them both to see if it works.

For debugging I used a sandbox account, which did not have access at the time to the enterprise export of the WSDL. That may have changed. It has been some time.

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/mteece/salesforce-dotnet/issues/17#issuecomment-221954108

mteece commented 8 years ago

Did you run the wsdl.exe against your WSDL file that you generated on disk? Then used the automatically generated SforceService.cs file? Did you add the SforceService.cs that was generated by your Salesforce Sandbox? Are you in a production system?

The SforceService.cs file is a direct representation of your SObjects against the WSDL file you export. It knows only what you let it know, when you export it. If the objects are not there in the SforceService.cs file, they are not in the WSDL file. There may be a permission or role problem for your user, or otherwise things far beyond the control of the library. If you don't have access on a larger production system then you made need higher access privileges.

The library can only know so much, it's up to the implementation to handle most of the scenarios. As I said before Gaiaware had abandoned the project, so any and all contributions are welcome.