--- title: "Run message or web service action from dynamic button" slug: "run-message-or-web-service-action-from-dynamic-button-web-service" description: "Learn how to add a dynamic button to your form in D365 F&SCM, enabling message execution or web service actions without coding." tags: ["Task topic"] updated: 2026-07-14T06:45:37Z published: 2026-07-14T06:45:37Z canonical: "docs.staedean.com/run-message-or-web-service-action-from-dynamic-button-web-service" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Run message or web service action from dynamic button You can add a dynamic button to a form to run a message or an outbound web service action from the form. To add a dynamic button, no coding is required. The dynamic button is added to the **Connectivity studio** tab of the **ActionPane** of the form. ### Steps 1. Go to **Connectivity studio > Setup > Dynamic action setup > Dynamic action setup.** 2. Click **New**. 3. Define to which form the dynamic button is added. In the **Form name** field, enter or select a value. 4. Define the message that is run with the dynamic button. Usually, you use a message that is related to the form and its defined data source. In the **Message** field, enter or select a value. > [!NOTE] > **Note** You either define a message or an outbound web service action. 5. Define the outbound web service action that is run wit the dynamic button. Usually, you use an outbound web service action which request message is related to the form and its defined data source. In the **Web service action** field, enter or select a value. > [!NOTE] > **Note** You either define a message or an outbound web service action. 6. The dynamic button is added to an **ActionPane** tab of the form, called Connectivity Studio. If several dynamic buttons are added to the same form, you can define the sequence in which these buttons appear on the **Connectivity studio** tab of the **ActionPane**. In the **Sequence** field, enter a number. 7. Define to which data source of the form the message or web service action applies. Usually, you select the data source that is the root record of the message or of the request message of the web service action. In the **Data source name** field, enter or select a value. 8. Sub-task: Define the execution settings. 1. Expand the **Execution section**. 2. Define how the message or web service action is run: In the **Run mode** field, select an option. > [!NOTE] > **Note** If the **Run mode** is **Background** or **Batch**, you must also define the batch group. - **No**: The message or web service action is run immediately. When you click the dynamic button, you must wait till the message or web service action is processed before you can proceed with your work. - **Asynchronous**: The message or web service action is run (almost) immediately in the background. When you click the dynamic button, you can proceed with your work while the message or web service action runs. - **Batch**: The message or web service action is run in batch. When you click the dynamic button, you can proceed with your work. The message or web service action is scheduled and run by the batch framework. 3. If you define conditions for the dynamic button, you can use the Hide option. If you select **Yes**, the dynamic button is shown only for the records that meet the defined conditions. Select **Yes** in the **Hide** field. 4. Define for which records the message or web service action is run: Select **Yes** in the **Current record** field. > [!NOTE] > **Note** > > - If you select several records, the dynamic button is disabled. > - The **Current record** option is applied only if you have defined a data source for the dynamic button. - **No**: The message or web service action is run for all records in the data source. - **Yes**: The message or web service action is run only for the current record. 5. If you have selected **Yes** for the **Current record** field, you can also indicate if the message or web service action can run for only one or for several selected records: Select **Yes** in the **Multiple record** field. > [!NOTE] > **Note** > > The **Multiple records** option is applied only if you have defined a data source for the dynamic button. - **No**: The message or web service action is run only for the current record. - **Yes**: The message or web service action is run for all selected records. For each selected record, the message or web service action is run separately. 6. If you have selected the run mode **Async** or **Batch**, define the batch group that is used to run the message or web service action. In the **Batch group** field, enter or select a value. 7. Define if the dynamic button applies to all companies in your D365 F&SCM environment or to a specific company. If the dynamic button applies to: In the **Company ID** field, enter or select a value. - All companies, do not fill in the **Company ID** field. - A specific company, enter the company in the **Company ID** field. 8. You can select a user account whose security permissions are used to run the dynamic action. This enables users to use the dynamic action without granting them direct access to underlying data. For example, a warehouse worker can trigger an EDI messages without having access to the related data. To run the dynamic action, the **Run as** user’s permissions are used instead of the warehouse worker’s permissions. Use the **Run as** option to support complex scenarios, such as multi-legal entity processing, without broadening user access rights. In the **Run as** field, select the desired user. > [!NOTE] > **Note** > > If you use the **Run as** option, an **Audit log** can be activated. When activated, the **Audit log** records who triggered each action, which user context was used, when it was executed, and what message or web service was involved. To view the **Audit log**, on the **Action pane**, click **Audit log**. > > You can activate the **Audit log** in the **Connectivity studio parameters** > **Features** tab > **Dynamic action audit trail** field. See also: [Set up Connectivity studio parameters](/data-management/docs/set-up-connectivity-studio-parameters) > > To clean up the **Audit log**, refer to [Clean up history tables](/data-management/docs/clean-up-history-tables). 9. Sub-task: Define the display settings. 1. Expand the **Display** section. 2. Define the name with which the dynamic button is shown on the form. In the **Label** field, type a value. 3. Define the text that is shown as tooltip for the dynamic button. In the **Caption** field, type a value. 10. Sub-task: Define who can use the button. 1. Expand the **Assignment** section. 2. Click **Add** assignment. 3. Define how to assign users to the dynamic button: Make sure, the defined users, at least, are assigned to the '**Message run (BisMessageRun)**' role. In the **Type** field, select an option. > [!NOTE] > **Note** > > If you define: > > - No assignment, each user with the right role can use the dynamic button. > - An assignment, only the assigned users with the right role can use the dynamic button. For other users, the dynamic button is not shown. - **User**: A specific user can use the dynamic button. - **Team**: All users that are linked to the defined team can use the dynamic button. - **Role**: All users with the defined role can use the dynamic button. 4. Define the user, team, or role for the assignment. In the **Name** field, enter or select a value. 11. Sub-task: Define to which data the button applies. 1. You can define to which data the dynamic button applies. You can only use the dynamic button for the records that meet the conditions. If you do not define conditions, the dynamic button applies to all records of the data source. Expand the **Field condition** section. > [!NOTE] > **Note:** > > - You can only define and apply conditions if you have defined a data source for the dynamic button. > - If you select **Yes** in the **Hide** field, the dynamic button is shown only for the records that meet the defined conditions. 2. You can initialize the conditions that apply to the dynamic button. The initialization is based on the: If the source document type is: Click **Initialize condition**. > [!NOTE] > **Note** > > You can change or remove the initialized conditions. - Data source as defined for the dynamic button. - Record and field setup of this data source in the source document of the relevant message. - D365 F&SCM or a journal, each range, as defined in the source document for the data source, is added as condition. - Staging, the staging journal type, as defined in the source document for the data source, is added as condition. 3. You can manually add conditions. Make sure, the defined conditions are relevant for the message or web service action request message. Click **Add condition**. 4. In the **Field name** field, enter or select a field of the defined data source. 5. In the **Condition** field, enter or select the field values to which the condition applies. > [!NOTE] > **Note:** > > - Examples of values that you can use to define a condition: > - ..Item1: Item1 and smaller > - Item1..: Item1 and greater > - Item1,item5..item10: Item1 or item5 till item10 > - Item1,item2: Item1 or item2 > - !123: Not 123 > - “”: Empty > - !””: Not empty > - curExt(): Used to apply a condition with the current company 12. Sub-task: Translate display settings. 1. You can translate the label and caption as defined in the display settings. If translations exist, depending on the D365 F&SCM environment language settings, the dynamic button is shown in the relevant language. Click **Translations**. 2. Click **Edit**. 3. Select and add the language into which you want to translate the display settings. Click **Add** to open the drop dialog. 4. In the list, find and select the desired language. 5. Click **OK**. 6. In the **Translated text - Label** field, type the label translation. 7. In the **Translated text - Caption** field, type the caption translation. 8. Close the page. > [!NOTE] > **Note** > > Since Connectivity Studio release 10.0.337.57, translations are stored globally. So, in a D365 F&SCM environment, only one dynamic action translation is used. To upgrade to the new setup, run the **Connectivity studio > Periodic** > **Upgrade > Upgrade dynamic action label translations script**. this script removes duplicate dynamic action menu translations across the companies in the D365 F&SCM environment. 13. Close the page. > [!NOTE] > **Notes** > > To run the message or outbound, web service action: > > 1. Open the form to which the dynamic button is added. > 2. Depending on the dynamic button setup, select no, one, or several records. > 3. On the **ActionPane**, on the **Connectivity studio** tab, click the dynamic button. > > The message or outbound web service action is run in the way as defined by the run mode. ## Related - [Set up Connectivity studio parameters](/set-up-connectivity-studio-parameters.md)