Saturday 25 April 2015

How to Get Text from String Edit Control in Form Microsoft Dynamics AX 2012 R3

I am a newbie in AX.. ^^ I have a difficult time to search article that show a way to get text from string edit control in form AX 2012 R3. Thank God, I finally found a solution. Hope this tutorial is helpful to you (^o^)/

1. We need to add string edit control in our form
a. In your form, right click on Design > New Control > Tab
b. To make your tab is autosize, change width to Column Width and height to Column Height
c. Right click on Tab > New Control > TabPage
d. Right click on TabPage > New Control > StringEdit


2. Change Property of StringEdit 
a. Name : TxtMyString
b. Auto Declaration : Yes (to make your control is available in your X++ code
c. Width : Column Width (set autosize of StringEdit)
d. Label : My String (set caption of StringEdit)
e. ExtendedDataType : ItemFreeTxt

3. Add method in StringEdit to get text when StringEdit is modified.
a. Expand StringEdit:TxtMyString
b. Right click on Method > Override method > modified 



4. Add x++ code like below to get text from StringEdit control
a. Add "info(TxtMyString.text());"
b. Click Compile and Save (make sure there is no error - red underline)


Voila... Now we get text from our TxtMyString ^^ Super easy right?

Friday 24 April 2015

How to Get Source Information of Form in Microsoft Dynamics AX 2012 R3

Are you newbie in AX? Do you have a difficult time to get source information of form in AX 2012 R3? I have it before until today. Hope this information is helpful to you :)

1. Open your desired form in AX Rich Client. I choose to open form "Posting Product Receipt".
2. Right click in blank area of form and click "Personalize".

3. Click tab "Information" then you will get information of Form name in instant way!

Yeah, I admit that I have search start from "Menus" in AOT to find the source of a form in AX. hahaha.. I am so happy to know this simple way :)