Hi everyone,
I'm a Sugar newb and I'm trying to create my own EditView. I started out by using Module builder to build a basic "Person" module. From there I would like to modify things by hand (adding custom fields, etc).
I've created the EditView.html and Editview.php and added the appropriate XTemplate assignments in order for information to be displayed when you click on "Edit" from an existing "person". This works great.
My confusion lies in where information gets stored to the db. In referring to the "SugarCRM Developer's Manual" it mentions that you must define a new file called Save.php. Looking at this code it appears as though some preprocessing occurs and the data is written to the appropriate table (that has been defined in the Vardefs.php file). I wrote out the code from the book and I'm not sure if it's getting executed or not (not sure if I have to call something else).
I've also looked through: http://www.sugarcrm.com/wiki/index.php?title=EditView , which hasn't helped me much because I'm not sure how the data is saved, I see that the save button contains a call to this: onclick="this.form.action.value='Save';return check_form('EditView');"
On some other forum threads (http://www.sugarcrm.com/forums/showthread.php?t=40550) it says that you can use a "function save()" method in your class, which I would assume would get called with something like $focus->save().
How/when are each of these things ( Save.php or save() ) called? Is Save.php still a relevant way to save data or should I be using something else entirely? I've tried to refer to other default modules (ex. Users, Email) but I think I've just confused myself further. Please help!
Btw, I'm using SugarCRM CE 5.2.0h
Any help would be greatly appreciated.
Thanks in advance!
Brian


LinkBack URL
About LinkBacks



Reply With Quote


Bookmarks