Your understanding of Callbacks in JS isn't quite right. The entire save function will complete before the callback function on the button will ever get triggered. You'll need to always cancel it first, and then allow it on a new Save call from within your callback:
if ( duplicateRequestWithoutPRI ) {
// Prevent save unless user has allowed it...
if(someStaticVariableAllowSave){
// Allow Save, but reset variable
someStaticVariableAllowSave = false;
return;
} else {
context.getEventArgs().preventDefault();
}
//Otherwise we need to give the USS the option to create or not
Alert.show( "An active request for the same security classification for an individual with the same Lastname/DOB already exists.", null,
[{
label: "Create Request",
callback: function () {
someStaticVariableAllowSave = true;
Xrm.Page.data.save();
Alert.show( "Request created successfully!", null, null, "SUCCESS", 500, 200 );
}
},
{
label: "Cancel Request",
callback: function () {
}
}], "WARNING", 500, 200 );
}