Skip to content

Instantly share code, notes, and snippets.

@masayang
Created June 25, 2011 01:06
Show Gist options
  • Select an option

  • Save masayang/1045977 to your computer and use it in GitHub Desktop.

Select an option

Save masayang/1045977 to your computer and use it in GitHub Desktop.
salesforce-python
from sforce.enterprise import SforceEnterpriseClient
h = SforceEnterpriseClient('/home/user/.conf/enterprise.wsdl.xml')
h.login('user1@yourdomain.com', 'password', 'securitytoken')
lead = h.generateObject('Lead')
lead.FirstName = 'Masayoshi'
lead.LastName = 'Nakamura'
lead.Company = 'Masasushi, Inc.'
lead.Email = 'masayang@hogehogehoge.com'
result = h.create(lead)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment