I've got a function which takes values from several inputs and generates HTML to send via email. I'm using MS Flow to accomplish this.

All was well until I changed one of the input boxes to a dropdown menu; now the send email button no longer works. I want to attribute it to this function here:

function createListItem() {
            var clientContext = new SP.ClientContext(webURL);

            var oList = clientContext.get_web().get_lists().getByTitle("EmailServer");

            var itemCreateInfo = new SP.ListItemCreationInformation();
            this.oListItem = oList.addItem(itemCreateInfo);

            oListItem.set_item("Employee_Email", document.getElementById("EmployeeEmail").value);
            oListItem.set_item("Email_Content", email_employee_html);
            oListItem.set_item("Manager_Email", document.getElementById("ManagerEmail").value);
            oListItem.set_item("Manager_Content", email_manager_html);

            oListItem.update();

            clientContext.load(oListItem);

            clientContext.executeQueryAsync(Function.createDelegate(this, this.onEmailQuerySucceeded), Function.createDelegate(this, this.onEmailQueryFailed));
        }

but I'm not entirely certain. Does anything glaringly obvious pop out at anyone?

  • Updated code-- uploaded the wrong function initially! – bean03 Sep 14 at 14:43
  • I suggest you provide more information about which the input boxes change to a dropdown menu. – LZ_MSFT Sep 17 at 8:48

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.