M3_H5_GenericAPICallButton
Use this H5 script to call an API to perform a task which depends on your request, for example, changing the status of a supplier or an item from a list, clearing a cache to a program, or executing an action by retrieving input field parameters from a form panel.
- View the outcome of the request which includes the updated status and input fields through a modal window. The message depends on the quantity of selected lines that were processed.
For multiple record selections, the process is terminated when it encounters an error. Remaining lines are automatically skipped, and only those processed before the error are completed.
- Hide the modal for the current session by clicking . When applied, the outcome is shown in the message bar at the bottom panel. The configuration resets per session by opening a new tab or reloading the page.
Script arguments
- On 'Custom List MI. Open' (CMS015), clear cache using this argument:
MRS001 Clear Cache CMS100MI|5|5|#DE5D83|MRS001MI|ClearCache|MINM:CMS100MI|Success|Cache CMS100MI cleared
Argument Example Optional Descriptions Button name MRS001 Clear Cache CMS100MI No Use a button name which depends on your requirement. The default name is Generic API Call. Target row for the button 5 No Specify any row selection for the button placement. Target column for the button 5 No Specify any column selection for the button placement. Button color #DE5D83 Yes Use any hexadecimal color code based on your requirement. The script uses the default color if color is undefined in the argument. Program MRS001MI No The API that has the transaction. Transaction ClearCache No The required transaction to be used by the API. Input fields MINM:CMS100MI
No The argument is separated by a semi-colon and defines the required input field for the transaction. The example uses a static input field and does not require record selection.
Success message header Success No After the API call is processed without any errors, the message containing the header is displayed in the pop-up. Success message body Cache CMS100MI cleared No After the API call is processed without any errors, a message that describes the outcome is displayed in the pop-up. - In 'Item. Open' (MMS001), release an item using this argument:
Release Item|6|20|#FF1493|MMS200MI|UpdItmBasic|ITNO:QA_TESTING;CONO:{CONO};DIVI:{DIVI};STAT:20|Success|Item Released
Argument Example Optional Descriptions Button name Release Item No Use a button name which depends on your requirement. Target row for the button 6 No Specify any row selection for the button placement. Target column for the button 20 No Specify any column selection for the button placement. Button color #FF1493 Yes Use any hexadecimal color code based on your requirement. The script uses the default color if color is undefined in the argument. Program MMS200MI No The API that has the transaction. Transaction UpdItmBasic No The required transaction to be used by the API. Input fields ITNO:QA_TESTING;CONO:{CONO};DIVI:{DIVI};STAT:20
No The argument is separated by a semi-colon and defines the required input field for the transaction. The example uses both static and contextual input field, and does not require record selection.
Success message header Success No After the API call is processed without any errors, the message containing the header is displayed in the pop-up. Success message body Item released No After the API call is processed without any errors, a message that describes the outcome is displayed in the pop-up. - On 'Item. Open' (MMS001/E), update an item status using this argument:
20|7|60|#134D71|MMS200MI|UpdItmBasic|ITNO:<WEITNO>;STAT:20|Success|Status is set to 20
Argument Example Optional Descriptions Button name 20 No You can use any button name which depends on your requirement. The default name is Generic API Call. Target row for the button 7 No Specify any row selection for the button placement. Target column for the button 60 No Specify any column selection for the button placement. Button color #134D71 Yes Use any hexadecimal color code based on your requirement. The script uses the default color if color is undefined in the argument. Program MMS200MI No The API that has the transaction. Transaction UpdItmBasic No The required transaction to be used by the API. Input fields ITNO:<WEITNO>;STAT:20
No The argument is separated by semi-colon and defines the required input field for the transaction. The example uses a dynamic input field retrieved from the form panel and does not require record selection.
Success message header Success No After the API call is processed without any errors, the message containing the header is displayed in the pop-up. Success message body Status is set to 20 No After the API call is processed without any errors, a message that describes the outcome is displayed in the pop-up. - In 'Item. Open' (MMS001), release an item using this argument:
Release Item|6|20|#FF1493|MMS200MI|UpdItmBasic|ITNO:<ITNO>;STAT:20|Success|Item Released
Argument Example Optional Descriptions Button name Release Item No You can use any button name which depends on your requirement. The default name is Generic API Call. Target row for the button 6 No Specify any row selection for the button placement. Target column for the button 20 No Specify any column selection for the button placement. Button color #FF1493 Yes Use any hexadecimal color code based on your requirement. The script uses the default color if color is undefined in the argument. Program MMS200MI No The API that has the transaction. Transaction UpdItmBasic No The required transaction to be used by the API. Input fields ITNO:<ITNO>;STAT:20
No The argument is separated by semi-colon and defines the required input field for the transaction. The example uses a dynamic input field retrieved from a grid record and requires record selection.
Success message header Success No After the API call is processed without any errors, the message containing the header is displayed in the pop-up. Success message body Item Released No After the API call is processed without any errors, a message that describes the outcome is displayed in the pop-up.