This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:devel:saverecordfromwithin [2015/10/24 18:49] 127.0.0.1 external edit |
en:devel:saverecordfromwithin [2019/08/30 12:58] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to properly save a record from within the application ====== | ====== How to properly save a record from within the application ====== | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | Please [[http://blog.corebos.org/blog/feedingdatatosave|read this very well explained article]] from Luke. | ||
+ | </WRAP> | ||
===== Background ===== | ===== Background ===== | ||
Line 72: | Line 76: | ||
$ticket->column_fields['ticketstatus'] = $newStatus; | $ticket->column_fields['ticketstatus'] = $newStatus; | ||
$ticket->mode = 'edit'; | $ticket->mode = 'edit'; | ||
- | $handler = vtws_getModuleHandlerFromName('Events', $adminUser); | + | $handler = vtws_getModuleHandlerFromName('HelpDesk', $adminUser); |
$meta = $handler->getMeta(); | $meta = $handler->getMeta(); | ||
$ticket->column_fields = DataTransform::sanitizeForInsert($ticket->column_fields,$meta); | $ticket->column_fields = DataTransform::sanitizeForInsert($ticket->column_fields,$meta); |