Skip to content

MobileCRM.UI.MessageBox.show

rescocrm edited this page May 15, 2023 · 9 revisions

Shows a popup window which allows the user to choose one of the actions.

Arguments

Argument Type Description
success function(obj) The callback function that is called with chosen item string.
failed function(errorMsg) The errorCallback which is called asynchronously in case of error.
scope Object The scope for callbacks.

This example demonstrates how to create and display the message box with buttons "YES" and "No".MobileCRM.UI.MessageBox object.

var popup = new MobileCRM.UI.MessageBox("title");
/// Add the buttons for message box
popup.items = ["Yes", "No"];
/// If title is too long set the 'multi-line' to true
popup.multiLine = true;
popup.show(function (button) {
	if (button == "Yes")
		MobileCRM.bridge.alert("You taped on 'Yes' button");
	else
		MobileCRM.bridge.alert("You taped on 'NO' button");
	return;
});
Clone this wiki locally