Delete Record when cancelled

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
christopher.young
Posts: 8
Joined: Wed Oct 05, 2016

12 Oct 2016

I would like to delete the list item anytime the cancel button is clicked in the Edit Form

YuriyMedvedev
Moderator
Posts: 33
Joined: Wed Sep 21, 2016

13 Oct 2016

Hi! You can use this code to do it:

Code: Select all

fd.cancel().click(function(){
    SP.Ribbon.PageManager.get_instance().get_commandDispatcher().executeCommand('Ribbon.ListForm.Display.Manage.DeleteItem', null);
});

christopher.young
Posts: 8
Joined: Wed Oct 05, 2016

13 Oct 2016

Worked great, thank you

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests