Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Alert JS (Alert.Input() is not a constructor)

(1) ShareShare
ReportReport
Posted on by 932

Using below code i am trying to showPrompt using Alert JS but, it returns an error which is Alert.Input() is not a constructor.

How could i solve the same issue?

 

function Myalert()

{
var CaseE = Xrm.Page.getAttribute("new_first_escalation").getValue();

if(CaseE == true){

var options = {
id: "promptExample",
buttons: [new Alert.Button("OK", function(results) {
var subscribe = results[0].value;
var details = results[1].value;

alert("Subscribe: " + subscribe);
alert("Details: " + details);
})]
};

var alertBase = new Alert(options);
alertBase.showPrompt([
new Alert.Input({ label: "Subscribe", type: "checkbox" }),
new Alert.MultiLine({ label: "Details" })
]);

}
else {
Alert.show("Would you like to create a sale?", "This will create and open the new sale record.",
[
new Alert.Button("Create Sale", function () {
Alert.show("Sale created successfully!", null, null, "SUCCESS", 500, 200);
}, true, true),
new Alert.Button("Not now")
], "QUESTION", 500, 200);
}
}

*This post is locked for comments

  • Suggested answer
    RE: Alert JS (Alert.Input() is not a constructor)

    You should raise this issue with the Alert library owner on github github.com/.../issues

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans