Duplicate button cannot create new records from existing record

Duplicate button cannot create new records from existing record

wonglikwonglik Posts: 29Questions: 2Answers: 0

I have added the button Duplicate as below. It can copy the fields from the selected row and pop up for editing. But when click on button 'Create from existing'. It has no new record update. Did I miss anything?

            {
                extend: 'selected',
                text: 'Duplicate',
                action: function (e, dt, node, config) {
                    // Start in edit mode, and then change to create
                    editor
                        .edit(table.rows({ selected: true }).indexes(), {
                            title: 'Duplicate record',
                            buttons: 'Create from existing'
                        })
                        .mode('create');
                }
            },

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    That's the same code as in this example, and as you can see, it's working as expected there. Are you seeing console errors in the browser, or is the network response showing errors?

    Colin

Sign In or Register to comment.