Quantcast
Channel: Alert.js - CRM 2013-2016 Custom Alerts and Popup Dialogs JavaScript Lightbox
Viewing all articles
Browse latest Browse all 170

New Post: Dialogs from View/Grid

$
0
0
First off... thanks for sharing this with.
I've enjoyed using this Alerter on forms.
I've used for multiple question.
Work fantastic.

I've been trying to get the scipt going from a Ribbon-button.
So I had to dynamicaly load the webresources.
All went fine... up to the callback.
There the getDialogArguments is 'undefined' in the alert-dialog.js in the method buttonClicked

What I need is a way in a View to ask the user for which records need to be processed... All the records, or the records in the current View, or just the selected record(s).
I have the code in place for each scenario... I didn't want three ribbon buttons... I wanted to use this modal dialog.

Did you have the Alert work in a View/Grid... or can you point me in a direction to have this work..? Thanks..!
createXMLHttpRequest = function () {
    if (window.XMLHttpRequest) {
        return new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        return new ActiveXObject('Microsoft.XMLHTTP')
    } else {
        _error("Could not create XMLHttpRequest on this browser");
        return null;
    }
}
    // get the Alert script
    var httpRequest = createXMLHttpRequest();
    httpRequest.open("GET", Xrm.Page.context.getClientUrl() + "/webresources/mag_/js/alert.js", false);
    httpRequest.send(null);
    eval(httpRequest.responseText);
    
    Alert.show("Which record do you need to process?", null,
    [{
        label: "All",
        callback: function () {
            Alert.show("All records have been processed", null, null, "SUCCESS", 500, 200);
        }
    },
    {
        label: "Current View",
        callback: function () {
            Alert.show("Records in the current view have been processed!", null, null, "SUCCESS", 500, 200);
        }
    },
    {
        label: "Selection",
        callback: function () {
            Alert.show("Only selected records have been processed", null, null, "SUCCESS", 500, 200);
        }
    },
    {
        label: "None"
    }], "QUESTION", 500, 200);

Viewing all articles
Browse latest Browse all 170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>