Marius0188
asked on
Dynamics AX - Tab Delimited File
Dear Experts,
I am requested to build a small job that will output some dataset values based on a CustAccount and a Date Range to a tab delimited text file.
I got as far as to create the form, add all my controls to the form:
DateFrom, DateTo, CustAccount and a Button.
On the Button'c clicked method I assume I should implement my code for this.
Please advise and also show me an example on how to retrieve lines from CustInvoiceTrans based on the form input and write these lines to a TAB delimited text file.
Your help appreciated. :)
I am requested to build a small job that will output some dataset values based on a CustAccount and a Date Range to a tab delimited text file.
I got as far as to create the form, add all my controls to the form:
DateFrom, DateTo, CustAccount and a Button.
On the Button'c clicked method I assume I should implement my code for this.
Please advise and also show me an example on how to retrieve lines from CustInvoiceTrans based on the form input and write these lines to a TAB delimited text file.
Your help appreciated. :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok I will give this a try.
Not sure if I need a new question for this but let me try:
In the same project as above.
I want to run my code on the Button clicked method.
How do I reference the StringEdit controls on my form from within the clicked method?
Please show example.
Thanks.
Not sure if I need a new question for this but let me try:
In the same project as above.
I want to run my code on the Button clicked method.
How do I reference the StringEdit controls on my form from within the clicked method?
Please show example.
Thanks.
Is it web app or something else?
What is "StringEdit controls"? <textarea></textarea> ? or something else?
If it is <textarea name="MyTextArea"></textar ea>, when you click on Button and submit the form, read the content of this textarea in this way :
String myTextAreaText = request.getParameter("MyTe xtArea");
If it's already tab delimited then it's your "custLine" from msg 33627133.
What is "StringEdit controls"? <textarea></textarea> ? or something else?
If it is <textarea name="MyTextArea"></textar
String myTextAreaText = request.getParameter("MyTe
If it's already tab delimited then it's your "custLine" from msg 33627133.
ASKER
Nope not a webapp, in MS Dynamics AX I've added a form and added control to the form.
The control type is a StringEdit.
The control type is a StringEdit.
Hi Marius0188, what version of AX are you using?
In AX 4.0 or later you can set the AutoDeclaration property of the control to true
and then you can get/set the control's value like this:
info(StringEdit.text());
StringEdit.text("ABC");
For exporting data to a CSV file you can use the AsciIo class.
In AX 4.0 or later you can set the AutoDeclaration property of the control to true
and then you can get/set the control's value like this:
info(StringEdit.text());
StringEdit.text("ABC");
For exporting data to a CSV file you can use the AsciIo class.
it should be
String custLine = new StringBuilder(data1).appen
without the last "\t" as well.