Alert to user when custom button function runs

Alert to user when custom button function runs

How does one alert a user of the result of a custom function which triggers via Button?

I have Deluge code with a button at the View Record (not View List).

openURL() does not work.

Ideally there would be a standalone function that uses a single text string parameter to hold the message?

What is best practice for alerting users of such things?