Skip to content

Instantly share code, notes, and snippets.

@dhonig
Created June 4, 2012 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhonig/2870313 to your computer and use it in GitHub Desktop.
Save dhonig/2870313 to your computer and use it in GitHub Desktop.
Example of ruby contact creation
## Delete an Account
a = SugarCRM::Account.find_by_name("gganebnyi6@nebulent.com")
c = SugarCRM::Contact.new
c.first_name='John'
c.last_name = 'Doe'
c.description='Contact entered from Ruby Code'
c.team_name ="John Doe"
c.team_count="2"
a.contacts << c
a.save # or a.contacts.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment