M3_H5_CallPhoneNumber
Use this H5 script that adds a button to a program panel that you can click to call a phone number. The script triggers the tel protocol based on the provided argument and makes the call through any available application in your system that initiates calls. You can use this script in any program that contains the Telephone number field.
Script arguments
- Argument string examples for 'Customer Open' (CRS610/E) to call a
customer.
- Call,19,33,,WRPHNO
- Call,19,33,grey,WRPHNO
- Call,19,33,#F98300,WRPHNO
This table shows the objects included in the arguments and their descriptions:
Argument Example Optional Descriptions Button name Call No You can use any button name that relates to the purpose of the script, such as dial or contact. Target row for the button 19 No Specify any row selection, preferably near the telephone number field. Target column for the button 33 No Specify any column selection, preferably near the telephone number field. Button color empty, <color name>, or <hexadecimal color code> Yes You can use any of these options: - Leave the argument empty to use the default button color.
- Specify a color name. In the second argument example, the script uses grey.
- Specify any hexadecimal color code that begins with a hash sign. In the third argument example, the script uses #F98300.
Telephone number field WRPHNO No The Telephone number field where the phone number is retrieved by the script. - Argument string example for 'Supplier Open' (CRS620/E) to call a
supplier:
Call,11,33,,WIPHNO
This table shows the objects included in the argument and their corresponding descriptions:
Argument Example Optional Descriptions Button name Call No You can use any button name that relates to the purpose of the script, such as dial or contact. Target row for the button 11 No Specify any row selection, preferably near the telephone number field. Target column for the button 33 No Specify any column selection, preferably near the telephone number field. Button color empty Yes You can use any of these options: - Leave the argument empty to use the default button color.
- Specify a color name.
- Specify any hexadecimal color code that begins with a hash sign.
Telephone number field WIPHNO No The Telephone number field where the phone number is retrieved by the script.
Activating the script
- Add the M3_H5_ CallPhoneNumber
script and argument to any applicable program.
See procedure for adding a script in the M3 Core User and Administration Library (Cloud).
- Reload the source M3 program.
- Click the button added by the script. A prompt is displayed asking you which application to use to make the phone call.
- The selected application is launched.