Created
June 4, 2012 19:26
-
-
Save dhonig/2870313 to your computer and use it in GitHub Desktop.
Example of ruby contact creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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