Hey Casey,
it seems as if you are on the latest version available. So you should use the latest Client-API.
Here is the link on how to use the "openAlertDialog" from the official Microsoft documentation:
docs.microsoft.com/.../openalertdialog
Let me try to demonstrate it with an example in my development instance. I will explain each step as detailed as possible since I am not sure how much experience you have on customizing the system, please don't take it personal .
1. In my example I will open the alert dialog whenever a user fills a "whole number" field with the number 1 on the account entity. That way you will also see how you can access fields on the form via the new Client-API. In order to access fields or control on a form, you will need to pass the Execution Context when registering the JS-Function onto an onChange Event of a field. Once the Execution Context is passed to the function, we can get the Form Context from it and then retrieve field values with it.
2. On the Account Entity you can see my (whole number) field which can basically be any integer


3. Now we create a JavaScript file named "Alert_Example.js" and write the function that is going to open the Alert Dialog if the field contains the value/integer 1. Keep in mind that we will need Execution Context and then the Form Context from it to check the values of the field.
//Pass "executionContext" as first parameter
function OpenAlert(executionContext){
//Get the FormContext from the ExecutionContext
var formContext = executionContext.getFormContext();
//Get the Integer Field we want to check
var integer_field = formContext.getAttribute("evd_integerfield");
//Check whether the field contains any value at all in order to avoid an exception
if(integer_field.getValue() !== null){
//Check whether the field value equals 1
if(integer_field.getValue() == 1){
//Set the necessarry parameters for the Alert Dialog like the Label of the Confimation Button, the text and the Title of the Dialog
var alertStrings = { confirmButtonLabel: "Yes", text: "This is an alert.", title: "Sample title" };
//Set the width and height of the Dialog
var alertOptions = { height: 120, width: 260 };
//Call/open the dialog passing the parameters
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
function success(result) {
console.log("Alert dialog closed");
},
function (error) {
console.log(error.message);
}
);
}
}
}
4. Save the file and upload it as a new WebResource, save and publish it.


5. Go back to the Account form and add your WebResource to the form:



Close the FormProperties by confirming via "OK".
6. Now open the field properties of the integer field by double-clicking on it, head over to the "Events" tab and click on "Add" to add a new onChange Event:


7. Select your WebResource/JS-Library, type the name of the function and don't forget to tick the box for passing the executionContext:

8. Confirm the Handler via "OK" and close the Field properties via "OK. Finally "Save" and "Publish" the form.

9. Now head over to an Account record and try it out.
This is how it looks on the old/legacy User Interface:

This is how it looks on the new/unified User Interface:

And of course: If you set the value to anything else but 1, the dialog will not open:

10. Long story, short: Of course you can open the Dialog without checking any values but just on an onChange Event. In order to so, you don't need to pass the execution context (don't set the tick when adding the onChange Event) and the function would look like this:
function OpenAlert(){
//Set the necessarry parameters for the Alert Dialog like the Label of the Confimation Button, the text and the Title of the Dialog
var alertStrings = { confirmButtonLabel: "Yes", text: "This is an alert.", title: "Sample title" };
//Set the width and height of the Dialog
var alertOptions = { height: 120, width: 260 };
//Call/open the dialog passing the parameters
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
function success(result) {
console.log("Alert dialog closed");
},
function (error) {
console.log(error.message);
}
);
}
I hope that my little example helps you to understand how to open the official Microsoft Client-API Alert Dialog. If you check out the official Documentary you will see that a lot of "utility", "navigation", "webapi" or "device" functionalities still are to use via the "Xrm.". Anything else like entity, process (BPF), tabs, sections are available via the formContext which is always retrieved from the executionContext, which is being passed as the first parameter.
One exception for the formContext is when you work with Ribbons (e.g. RibbonWorkbench) in order to build your own buttons on forms. In there you will need to pass the "PrimaryControl" which actually is the formContext in that case.
But.... this is another story to learn and play with
P.S.: If you are seriously thinking about writing code more often, I strongly recommend to use a good Editor or Developing Suite. These tools will help you a lot with the syntax and similar stuff. If you are just beginning to learn, I would recommend something "light" like SubLime or VisualStudioCode. If you are advancing and want to get the professional tools for developing, Visual Studio 2019 is definitely the way to go.