[Vtigercrm-developers] vt7: can I listen for postAjaxSaveEvent in Detail.js? [Resolved]

Alan Lord alanslists at gmail.com
Fri Jan 27 13:23:18 GMT 2017


Just to help anyone else, you can trap this event:

My custom event:
> registerSvcPostAjaxSaveEvent: function () {
> app.event.on(Vtiger_Detail_Js.PostAjaxSaveEvent, function (e, fieldBasicData, postSaveRecordDetails,contentHolder) {...

the var "postSaveRecordDetails" contains all the record's field values; 
not just the one that was edited and saved.

HTH

Al

On 26/01/17 15:07, Alan Lord wrote:
> I'm very close to sorting out the issues with picklists and fields
> etc... I've moved all the calculations I wanted to perform into the
> Record Model and simply overidden the Save method to perform my
> calculations _before_ saving the record model.
>
> This SaveAjax call returns "all field values" back to Detail_Js as json
> in the var postSaveRecordDetails in the function
> registerAjaxEditSaveEvent().
>
> What I would really like to do is to listen for the event that occurs
> around line 1369:
>
>> var postAjaxSaveEvent = jQuery.Event(Vtiger_Detail_Js.PostAjaxSaveEvent);
>> app.event.trigger(postAjaxSaveEvent, fieldBasicData,
>> postSaveRecordDetails, contentHolder);




More information about the vtigercrm-developers mailing list