Issues when updating items (related to emails)

Home Forums Modern DFFS Issues when updating items (related to emails)

Viewing 5 reply threads
  • Author
    Posts
    • #38729
      Amal Vellappillil
      Participant

        Hi

        Using v1.2.1.0

        Test case 1
        ———-
        – List has an email rule that schedules email on a later day.
        – Created a new item. This created an associated item in ModernDFFSEmail list <– GOOD
        – Updated the item. UI is stuck in “Sending emails…” modal window
        – A POST request to _api/web/lists/getByTitle('ModernDFFSEmail')/items endpoint returned 400 Bad Request Status
        – Request payload `{
        “Title”: “6481224942832378:9”,
        “To”: “test@test.com”,
        “Cc”: “”,
        “Bcc”: “”,
        “Subject”: “[14 day reminder] testing updates will be expiring on 07/07/2025”,
        “Body”: “Hi,\n\ntesting updates will be expiring on 07/07/2025. Please review as soon as possible.\n<a href=\”https://test.sharepoint.com/sites/Intranet/_layouts/15/SPListForm.aspx?PageType=4&List=ff04bd17-ab2a-48a6-81c3-91b3f61ca054&ID=9&Souce=https://test.sharepoint.com/sites/Intranet/Lists/SSLCertificates/All.aspx\”>Click here to view the record</a>\n\nThank you,\nSharePoint Admin”,
        “ListGuid”: “ff04bd17-ab2a-48a6-81c3-91b3f61ca054”,
        “ListItemId”: 9,
        “Active”: true,
        “SendDate”: “2025-06-23T05:00:00.000Z”
        }`
        – Here is the error `{
        “odata.error”: {
        “code”: “-1, Microsoft.SharePoint.Client.InvalidClientQueryException”,
        “message”: {
        “lang”: “en-US”,
        “value”: “Cannot convert a primitive value to the expected type ‘Edm.String’. See the inner exception for more details.”
        }
        }
        }`

        Test case 2
        ———–
        – List has an email rule that schedules email on a later day.
        – Created a new item. This created an associated item in ModernDFFSEmail list <– GOOD
        – Deleted the associated email item from ModernDFFSEmail
        – Updated the item. UI is stuck in “Sending emails…” modal window
        – Errors were pretty much the same as Test case 1. A POST request was sent. From this I am guessing there is no check to see if an associated email item already exists for the record that is being updated. `- It would be nice for the system to first check if there is an associated email item.
        – If no record is found, create an associated email item in ModernDFFSEmail list.
        – If an item is found, then update that associated email item record in ModernDFFSEmail list.`

        Let me know if you need me to share more information with you.
        Thank you

      • #38730
        Alexander Bautz
        Keymaster

          Thanks for the detailed descriptions.

          Issue #1
          It turns out that the Item ID is passed as a number and not as a string when triggering from EditForm. I’ll fix that in a new version tomorrow.

          Issue #2
          The error is of the same reason as issue #1. The current functionality is to use “stop email” action in the rule to stop the scheduled email, but I’ll look at automatically updating it if it exists in the next version.

          Best regards,
          Alexander

        • #38733
          Alexander Bautz
          Keymaster

            Please check out v1.2.2.0 and let me know how it works out.

            Alexander

          • #38734
            Amal Vellappillil
            Participant

              I will test out and will let you know how it went.

            • #38735
              Amal Vellappillil
              Participant

                I tested by adding and updating items that are configured with schedule email. Adding new item seems to create new item in ModernDFFSEmail list fine. Updating updates the ModernDFFSEmail record accordingly if it already exists. If it does not exist for some reason, it will create a new one. Everything seems to be working as expected.

                The only outlier is orphaned ModernDFFSEmail list records. For this I added couple steps to the Flow for both send now and send later. You can add it to the users manual if it makes sense.
                – Before sending the email, Get Item from the originating list using the listid and listitemid
                – Add a condition to check If status code is success and data is not empty
                – If true send the email
                – If false do nothing
                – Outside the condition block, add the delete action. This way the ModernDFFSEmail record will get deleted after sending the email or if the item in the originating list does not exist.

                Thank you for working on a fix this quick.

              • #38738
                Alexander Bautz
                Keymaster

                  Thanks for the feedback. I have updated the example in the user manual related to “send later” with a check to see if the parent item exists.

                  Best regards,
                  Alexander

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