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
mdkmdk 

asp.net

Hey Guys,

I'm setting my web site up so that people who setup trial accounts through or trial page are saved as accounts in sales force. There just aren't very many examples so let me just bluntly ask the questions I've come across so far:

1) How to I create and save accounts in asp.net/vb.net ( I have succesfully attached the sforce api)

2) How do I get an existing ID programmaticaly?

Any help would be greatly appreciated.

DevAngelDevAngel

Hi mdk,

You use the same code as you would in a winform application.  Assuming the enterprise wsdl was used:

Dim act as new Account()

act.name = "Some Name"

(Set more properties here)

Dim objs() as SObject(1);

objs(0) = act

binding.create(objs)

 

To get an Id you would execute a query.

Dim qr as QueryResult = binding.query("Select Id from Account where Name = 'Some Name'")