From a0a0f1dfa2104f75da8e172119796778ad7f2b2d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 7 Aug 2013 21:37:34 -0700 Subject: [PATCH] CRM-13163 - crm.backbone.js - Pass 'options.reload=1' when creating/updating records ---------------------------------------- * CRM-13163: hrjob: Display/edit dates with jQuery date picker http://issues.civicrm.org/jira/browse/CRM-13163 --- js/crm.backbone.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/crm.backbone.js b/js/crm.backbone.js index 6d02cc246f..746ddaf7be 100644 --- a/js/crm.backbone.js +++ b/js/crm.backbone.js @@ -70,10 +70,13 @@ switch (method) { case 'create': // pass-through case 'update': + var params = model.toJSON(); + params.options || (params.options = {}); + params.options.reload = 1; if (!model._isDuplicate) { - CRM.api(model.crmEntityName, 'create', model.toJSON(), apiOptions); + CRM.api(model.crmEntityName, 'create', params, apiOptions); } else { - CRM.api(model.crmEntityName, 'duplicate', model.toJSON(), apiOptions); + CRM.api(model.crmEntityName, 'duplicate', params, apiOptions); } break; case 'read': -- 2.25.1