-
Notifications
You must be signed in to change notification settings - Fork 32
Examples
jdang edited this page Apr 26, 2011
·
11 revisions
SetEntry example: This code demonstration of how to create a new module to the server.
//Connecting to the server
S = sugarcrm.Sugarcrm("http://ruttanvm.cs.kent.edu:4080/<username>/service/v2/rest.php", <"username">, <"password">)
if S.connected == 1:
print "Connection Successful!"
if S.id != 0:
print "Login Successful!"
//Call set_entry functions
i = S.set_entry('Contacts', [{'name':'first_name', 'value': 'first_name'}, {'name':'last_name', 'value':'last_name'},{'name':'title', 'value':'CEO'}])
print i
GetEntry example: