fires after successful data insertion

void onAfterInsert(object response,id id,object details){ ... };


responseobjectthe JSON object with details of the server side response
ididthe old ID of the related item
detailsobjectthe object which holds the state of data saving


dp.attachEvent("onAfterInsert", function(response, id, object){
    //... some code here ... 


1 . The response parameter is a server response that can contain the new item id, status, newid with the serverside ID parameters and other properties, e.g.:

  • id - old ID (clientside);
  • newid - new ID (serverside);
  • sid - old ID (clientside);
  • tid - new ID (serverside);
  • status - status of the operation ("insert");
  • type - operation type ("insert");
  • value - saved data value.

2 . The id parameter is the old client-side item ID. It will differ from the serverside ID, as a rule.

3 . The details parameter contains data saving details, e.g.:

  • data - object with the information about the action performed;
  • loader - Ajax loader object;
  • text - full text of serverside response.

Will not fire for "error" or "invalid" responses.

//for such response
{ id:"123", status:"custom" }
//the onAfterCustom event will be called
Back to top