Thursday, 15 January 2015

sugarcrm - Difference between before_save and after_save using real time entities -



sugarcrm - Difference between before_save and after_save using real time entities -

i want know exact difference between before_save , after_save. now, have read documentation , know difference per name. but, want know exact difference using real time entities. great if provide example.

before save: functionality written here called when nail save button , before record stored in database. usage: before save can used normally. simple eg, lets can modify or add together field value before record goes database.

after save: functionality written here called when nail save button , after record stored in database. usage: help understand utilize of after_save, lets take scenario have pupil record containing sl.no, name, course , student no. lets sl.no auto incrementing field , pupil no combination of first letter of course of study , sl.no. here auto incremented no wont exist untill record saved in database, hence wont required pupil no unless record saved. so after_save here helps since logic executed after record has been saved, auto incremented no generated.

sugarcrm before-save after-save

No comments:

Post a Comment