Tutorial: Message start from active Dynamics AX record

Aug 9, 2016 9:00:14 AM
To-Increase-Corporate-Pic-4

Learn how you can use Connectivity Studio to start a message from an active record in the ERP system by using a menu item

Sometimes you want to start a message from an active record in Microsoft Dynamics AX, using a menu item. In today’s brief tutorial, you learn how you can use To-Increase Connectivity Studio for Microsoft Dynamics AX to accomplish this. Connectivity Studio dynamically adds this active record as a range to the source document and starts the message.

To keep this tutorial simple, we just add a Menu Item on the CustGroup form. This Menu Item uses the active CustGroup record to start the message.

Before you get started, two things:

  • You need to have Microsoft Dynamics AX 2012 with Connectivity Studio installed.
  • Download and import the Business Integration Solutions project with the required tutorial message.

Create a Menu Item

You can select a Menu Item on your Message to 'link' the Menu Item with the desired Message. If the Menu Item does not exist, Connectivity Studio automatically generates it for you.

  1. Open the Microsoft Dynamics AX 2012 Workspace.
  2. Navigate to Business integration solutions > Common > Connectivity > Messages.
  3. Select 'CustGroup' Message in the table.
  4. In the Message tab in the Action Pane, click Header view in the Show group.
  5. In the Custom FastTab enter 'TutorialCustGroupMenuItem' in the Action menu item name field.
  6. As soon as you leave the field you'll get a Create menu item form. Click OK to let Connectivity Studio generate a Menu Item in the AOT.CS tutorial - message from active record 1
  7. Click Close or Save.

Add Menu Item to CustGroup form

  1. Open the Microsoft Dynamics AX 2012 Development Workspace.
  2. Navigate to the node Forms > CustGroup > Designs > Design > ActionPane:ActionPane.
  3. Right-click on ActionPane:ActionPane node and select New Control > ButtonGroup.
  4. Right-click on the just created ButtonGroup node and select New Control > MenuItemButton.
  5. Select the just created MenuItemButton node and open the Properties.
  6. Select (in the properties window) 'Yes' in the NeedsRecord property, 'Action' in the MenuItemType property, and 'TutorialCustomGroupMenuItem' in the MenuItemName property.
    CS tutorial - message from active record 2
  7. Save your changes: Right-click the CustGroup node and select Save.

Try it out

Before you try to start the Message using the Menu Item, make sure that you can run the 'CustGroup' Message in your environment.

  1. Open the Microsoft Dynamics AX 2012 Development Workspace
  2. Navigate to Account receivable > Setup > Customers > Customer groups
  3. Select the desired line in the table and click Run message 'CustGroup'.CS tutorial - message from active record 3
  4. Check the result in your Work folder.

Thanks for following along! I hope you will find this tutorial useful. If you need more information about the Business Integration Solutions, please get in touch

 

Share this message
About Author
Pieter de Jong

Pieter de Jong

Business and Application Integration Specialist Pieter translates the business requirements of the industries and companies To-Increase serves into functionality in our Business Integration Solutions for Microsoft Dynamics AX. His specialized skills include model-driven development, Javascript, Java, HTML, XML, Visual Studio, and Eclipse. Before Pieter joined the team at To-Increase, he spent a career of close to 20 years as a software engineer and developer at Baan Info Systems and in other companies.

Get In Touch

Related Blogs

Nov 15, 2019 7:52:18 AM
Oct 31, 2019 9:54:07 AM
Oct 7, 2019 1:40:55 PM