dynamics-ax-2009

“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

Increasing the length of the Description field in movement journal in AX 2009

旧时模样 提交于 2019-12-25 07:24:12
问题 How can we increase the field length of Description field up to 200 characters available in Movement Journal in Inventory module in AX 2009? The field is InventJournalTable_DescriptionInventJournalTable(InventJournalTable).Description 回答1: Create a new Extended Data Type of type String. Set the StringSize property of your data type to 200. Find the JournalDescription Extended Data Type in the AOT. Change the Extends property of JournalDescription to the name of your new data type. Synchronize

LedgerJournalEngine and LedgerJournalCheckPost

拥有回忆 提交于 2019-12-25 02:15:14
问题 I am creating and posting Dynamics AX Ledger Journals from C#. I want to use the two helper classes the come with AX, LedgerJournalEngine and LedgerJournalCheckPost, to validate the journals I create. My questions are: 1.) How do you get a list of errors -> voucher from either of these classes or some other class? 2.) Can you simulate a post inside of a AX transaction and roll it back? 2-a.) If you roll back a posting in a transaction will AX be smart enough to reuse the voucher numbers that

Dynamics AX 2009: How to FTP from a batch job on an AOS

此生再无相见时 提交于 2019-12-24 17:18:40
问题 After quite a few searches for ways to FTP files in AX, I was happy to discover the WinInet class, which is more or less just a wrapper for the .DLL of the same name. I thought my problems were solved! I was not aware, however, that the class had a major Achilles heel -- it doesn't run in batch (on a server). Can anybody point me in the right direction? Specifically, I want to upload (FTP put) a file to another server in a server-run batch job (running as a service user with admin rights to

Field types in Dynamics Ax

♀尐吖头ヾ 提交于 2019-12-24 08:55:04
问题 Is it possible to store binary information in a Dynamics field? For example, I'd like to store an MS Word document inside the Dynamics database. 回答1: Yes, add a container field to the table, then use the BinData Class to read the file and convert the data to a container. For an examples of this, look at how the standard Document handling feature stores files in the database in the table method DocuValue.writeDocuValue() , or look at how image files are stored in the CompanyImage form. 来源:

How do I get the location for a row in dbo.CUSTTRANS?

两盒软妹~` 提交于 2019-12-24 08:03:06
问题 I am building a small AR data mart for a client which is using Dynamics AX (2012). The data from the mart will feed into a Power BI report. I know almost nothing about AX. There is a column in the dbo.CUSTTRANS table named DEFAULTDIMENSION. I was told, by the client, that this value can be used to retrieve a location description for the transaction row using the following query: SELECT T.DEFAULTDIMENSION ,T3.Name AS Location FROM dbo.CUSTTRANS T INNER JOIN dbo.DEFAULTDIMENSIONVIEW T2 ON T2

Merge several different dynamics AX reports in one

荒凉一梦 提交于 2019-12-23 03:33:22
问题 I'm investigating if it is possible to send three different Ax 2009 reports to only one output. We already have an example of merging multiple invoices using the SalesInvoice report into one output, but this is not what we want. The output would need to be generated by X++ and would contain for example: SalesInvoice SalesPurchInvoice_RU AKT_RU Any pointers? An ' It can't be done. ' is an acceptable answer! Thanks 回答1: It can't be done. Not in AX at least. But you could generate PDF then

Change the background color of a column in a grid

我只是一个虾纸丫 提交于 2019-12-22 08:46:08
问题 I have following form and I want to change the background color of a column, based on the values of other columns; In the orange columns, instead of displaying orange background, I want the cell color to be the RGB combo of Red, Green & Blue fields under COLOR ATTRIBUTES section. 回答1: Let's say that the control the background of which you need to change is named FirstFieldControl. Set its AutoDeclaration property to Yes and BackgroundColor to Window background . Now you need to override the

Display Methods - Multiple Form Data Sources

微笑、不失礼 提交于 2019-12-22 08:27:02
问题 This may seem a simple question, but for some reason I am vexed. I have a form with 3 datasources - InventTable , InventSum , InventDim . So, for example, my grid shows; Item, Name, Site, Warehouse, Physical Stock I have placed a display method on InventDim form DataSource, but I need access to the ItemId from either inventTrans or InventSum . (Obviously looking for the "current" itemId). All I can access is the inventDim which is passed as a parameter _inventDim , as standard. What is the