Move to getsingle api and associated changes
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 11 Aug 2015 21:11:56 +0000 (21:11 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 11 Aug 2015 21:11:56 +0000 (21:11 +0000)
ang/crmMailing/MsgTemplateCtrl.js
ang/crmMailing/services.js

index c5147b0b627c692677f2382f05a2de8408f3eec4..d8873075a4a34b87a7091dd76c94c99a1e3cee4e 100644 (file)
@@ -33,9 +33,9 @@
     // @return Promise
     $scope.loadTemplate = function loadTemplate(mailing, id) {
       return crmMsgTemplates.get(id).then(function(tpl) {
-        mailing.subject = tpl.values[0].msg_subject;
-        mailing.body_text = tpl.values[0].msg_text;
-        mailing.body_html = tpl.values[0].msg_html;
+        mailing.subject = tpl.msg_subject;
+        mailing.body_text = tpl.msg_text;
+        mailing.body_html = tpl.msg_html;
       });
     };
   });
index b4e69c2eee04bc30cfd3b2c2da863632a63268ea..c76da9238f53be8cc50aac5d9539848c4e2cabce 100644 (file)
@@ -64,8 +64,7 @@
       // @param id MessageTemplate id  (per APIv3)
       // @return Promise MessageTemplate (per APIv3)
       get: function get(id) {
-        return crmApi('MessageTemplate', 'get', {
-          "sequential": 1,
+        return crmApi('MessageTemplate', 'getsingle', {
            "return": "id,msg_subject,msg_html,msg_title,msg_text",
            "id": id
         });