Stop scheduled email not working

Home Forums Classic DFFS Stop scheduled email not working

Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #30517
      Amal Vellappillil
      Participant

        Hi,

        I am running into an issue where I want a rule to stop a pending (scheduled) email from a rule. I did specify “stop:emailtemplateid”. But for some reason the “Stop” value does not get updated in DFFS_Email list.

        Here are my findings.
        – DFFS gets all the pending emails for list item when processEmailTemplate function is called.
        – getPendingEmails function builds up a query to retrieve pending emails from DFFS_Email list.
        – However, the “Title” it constructs for the list item is different than the entry in DFFS_Email list.
        – See attachments to see the discrepancy. “Item_edi_view” screenshot has the developer window open with the query constructed just like getPendingEmails function.
        – Looks like DFFSID associated with the item and DFFS_Email entry is not what you get in edit form when queried with spjs.dffs.data._DFFSID (which is what is used to construct the query).
        – Also the spjs.dffs.data._DFFSID is a different value every time edit form is refreshed. I dont know if this is by design.
        – Because of this discrepancy, no emails are found as pending emails for the list item and nothing gets flagged to be stopped.

        Can you please look into this issue and let me know how to get this issue resolved?

        Thank you,
        Amal Vellappillil

      • #30526
        Alexander Bautz
        Keymaster

          Thanks for finding this bug – it was caused by an error in an internal function – and as you have documented it affects the stop:emailtemplate function.

          I’ll include this fix in the next release, but you can fix it by adding this to your custom js for now:

          spjs.dffs.writeDFFSID = function () {
              if (spjs.dffs.fieldData._DFFSID !== undefined) {
                  var inp = jQspjs("#dffs__DFFSID input");
                  if (inp.length === 0) {
                      setTimeout(function () {
                          spjs.dffs.writeDFFSID();
                      }, 100);
                  } else {
                      var currId = inp.val();
                      if (currId === "") {
                          var id = new Date().valueOf();
                          setFieldValue("_DFFSID", id);
                          spjs.dffs.data._DFFSID = id;
                      }else{
                          spjs.dffs.data._DFFSID = currId;
                      }
                  }
              }
          };

          Best regards,
          Alexander

        • #30527
          Amal Vellappillil
          Participant

            Hi Alex,

            Thank you for getting back so quickly. I will use this workaround till a proper fix is released.

            Thank you,
            Amal Vellappillil

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.