axapta

Dynamics AX FTP

荒凉一梦 提交于 2020-01-04 14:22:07
问题 I have problems to send csv file on ftp, I use the following code found on AxaptaPedia: object ftpo; object ftpResponse; System.Net.FtpWebRequest request; System.IO.StreamReader reader; System.IO.Stream requestStream; System.Byte[] bytes; System.Net.NetworkCredential credential; System.String xmlContent; System.Text.Encoding utf8; System.Net.FtpWebResponse response; ; reader = new System.IO.StreamReader(strfmt("%1%2","\\\\Server\\directory\\","Export.csv")); utf8 = System.Text.Encoding::get

How to rename dialog box buttons or create new in Ax 2012?

谁说我不能喝 提交于 2020-01-04 12:49:10
问题 Is it possible to rename dialog box buttons? For example on "okCancel" can I rename the "ok" button as "continue" ? If not please guide me how can I create my own dialog box? Thanks ahead. 回答1: A button has a "Text" property. You can set that property or do so by code: okButton.text("Continue"); The Box::okCancel uses the DialogBox class which is a kernel class and cannot be changed. The yesNoAxaptaForm method on the other hand uses an AX form, so you can roll on your own. That said it seems

How to count report pages in pre-rendered MorphX report?

谁都会走 提交于 2020-01-04 04:33:28
问题 We are trying to force a morphX report to be an even number of pages in length (so our auto-folding machine can handle the workload properly) and have been unsuccessful in using element.pagesTotal() to do so. How have others gotten a page count for per-entity reports at the element level? (this is dynamics ax 2009) 回答1: Sorry, but pagesTotal is a "magic" function that delivers the result after the report has finished, which is too late for you to emit a newPage . You will have to count

How to make dialog elments collapsible?

巧了我就是萌 提交于 2020-01-04 03:15:10
问题 Is there any way to make DialogGroup elements collapsible through X++? I've been looking at MSDN and going through the class but I don't seem to find something that would be useful. Another developer has added two groups to the dialog that is displayed when creating a payment proposal (CustVendPaymJournal_Vend Class) and the "Ok" and "Cancel" buttons are no longer displayed on smaller resolutions (1024x768). My approach is to make some of the groups collapsible to enable the dialog to display

How to hide enum values on a combo box at runtime?

偶尔善良 提交于 2020-01-04 03:14:47
问题 Suppose the combobox is linked to enum "ABC". The elements in it are A, B C and D. Now I need to get only A and C in the combobox and not B and D? Is this possible? 回答1: It is not possible to delete enum values or combobox values. You can duplicate the enum, then delete elements or change the order (but not the enum value). It will be your responsability to maintain both enum types synchronized with future changes. To assign an enum to another incompatible enum, just add zero to it! abc =

How to create a lookup with fields from more than one datasource?

只愿长相守 提交于 2020-01-01 15:35:10
问题 I need to create Dynamic lookup in my form field which should display fields from two different datasources.. I am trying to perform it as: public void lookup() { query = new Query(); sysTableLookup = SysTableLookup::newParameters(tableNum(smmBusRelTable), this); qbds = query.addDataSource(tablenum(smmBusRelTable)); // qbds.addDataSource(tableNum(DirPartyTable)); //qbds.relations(true); sysTableLookup.parmQuery(query); sysTableLookup.addLookupField(fieldNum(smmBusRelTable, Busrelaccount)); /

Execute .exe in SSRS Report

旧时模样 提交于 2020-01-01 07:34:08
问题 i want to execute a .exe in a SSRS Report from Microsoft Dynamics AX . I tried so far to realize that over Custom Code and a Textfield with following Expression: =Code.StartProcess("test") Public Function StartProcess(ByVal s As String) As String Dim pHelp As New ProcessStartInfo pHelp.FileName = "test.bat" pHelp.Arguments = s pHelp.UseShellExecute = True pHelp.WindowStyle = ProcessWindowStyle.Normal Dim proc As Process = Process.Start(pHelp) Return "it works" End Function I get the error "

“this” vs. “element” keyword in X++

只谈情不闲聊 提交于 2020-01-01 04:01:07
问题 When writing code in X++ you sometimes need to reference this.functionYouWant() and sometimes it is element.FunctionYouWant() . Sometimes both are in scope. I often try one and if the function I want isn't there I try the other. Is there a rule that explains when to use this and when to use element ? 回答1: this can be used in any objects to reference the current object and member methods. MorphX forms and reports are composite objects. In forms the collection of objects is contained within a

how to get static range in your report

蓝咒 提交于 2019-12-25 15:54:19
问题 In AX Report the User can select different Range. I seek to show that the criteria used to filter user in the report itself even the expression "parameter!CustomerAccount.Value" don't work because this filter is not a static parameter. the user can use any table from the query and any field from the table and any criteria.. I'm locking for trick to get for which table, which field and what criteria it uses. 回答1: this method work very well ^_^ (( I use it privet and not static )) static void

How to get RecId selected from lookup method?

大城市里の小女人 提交于 2019-12-25 13:20:16
问题 I want to get the RecId selected from lookup method? In lookup method in StringEditLookup_ZipCode public void lookup() { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(LogisticsAddressZipCode), this); sysTableLookup.addLookupField(fieldNum(LogisticsAddressZipCode, ZipCode)); sysTableLookup.addLookupField(fieldNum(LogisticsAddressZipCode, City)); sysTableLookup