Expand my Community achievements bar.

SOLVED

Delete event of Multifield aem 6.5

Avatar

Level 4

Hi All,

I have a requirement that i have to capture multifield add and delete them and make ajax call after modification and capture fields. i am using a ajax call inside dialog-success function. It is working fine for adding multifields, but failing for delete. Whenever i delete any entry and save the dialog, it captures deleted entry too. It looks like node structure is not getting updated after delete operation.

 

Any help is appreciated.

 

Thanks,

 

1 Accepted Solution

Avatar

Correct answer by
Level 3

dailog-ready should be work in this case. 

Refer below code for reference

    $document.on("dialog-ready", function () {
        var $myMultifield = $("#multifie_ld");
        
        $myMultifield.on("coral-collection:remove", function (event) {
            var $removedItem = $(event.item);
            your_ajaxCall();
        });
    });

 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 3

dailog-ready should be work in this case. 

Refer below code for reference

    $document.on("dialog-ready", function () {
        var $myMultifield = $("#multifie_ld");
        
        $myMultifield.on("coral-collection:remove", function (event) {
            var $removedItem = $(event.item);
            your_ajaxCall();
        });
    });