Read Query String in Dynamics 365 Operations – AX 7

Challenge: To read query string parameter in form init() method

Solution: URLUtility class is used to extract the query string parameters. To explain this, I have created a simple form designed to extract query string in the init method and display in a text control.

  • A display menu item is attached with the form “Form1”

d1

  • A string control is attached and the “AutoDeclaration” property is set to “Yes”. Assign custom pattern to the form.

d2

  • Below code in the form init() method retrieves the query string information and set to the string control.

D3

  • Execute the menu-item linked with the Form and attach the following line in the url link

&queryParm=Hello,world

D4

  • The query string value is displayed in the text control.