dynamics-ax-2009

Return a list to .NET Business Connector

丶灬走出姿态 提交于 2019-12-12 03:35:37
问题 Currently, I am using the following code: Axapta ax = new Axapta(); string tableName; ArrayList ax_cont = null; ax.Logon(null, null, null, null); try { ax_cont = (ArrayList)ax.CallStaticClassMethod("Code_Generator", "tableNames"); for (int i = 1; i <= ax_cont.Count; i++) { tableName = ax_cont[i].ToString(); tablesCB.Items.Add(tableName); } } catch { } But I'm getting a type conversion exception. What do I need to do in C# when a list is returned from ax dynamics as an AxpataObject ? 回答1: It

AX2009 - str data type limit

雨燕双飞 提交于 2019-12-11 06:34:53
问题 Is there any limit on the size of the str data type in AX2009? There is also the extended data type (Memo) which can be inherited by extended data types. What is the difference between a extended data type inherited by (Memo) and the str data type? As is not (Memo) also just a str data type? 回答1: For the limit: Yes and no. For practical purposes it is unlimited but the X++ runtime has a certain limit which you can find out by feeding large values to the strrep function until you will

vb.Net code to use AX 2009 ReturnOrderInService web service

被刻印的时光 ゝ 提交于 2019-12-11 05:48:59
问题 Need to use the create method of the AX 2009 ReturnOrderInService web service in a vb.NET aspx page to create an RMA in AX. The code I've written below creates the RMA in AX, but doesn't show the line details in the AX RMA form, even though the records are in SalesTable and SalesLine. Is a record needed in InventTrans or is there a missing InventRefId value somewhere? Dim rmaClient As ReturnOrderInServiceClient = New ReturnOrderInServiceClient("WSHttpBinding_ReturnOrderInService1") Dim roi As

Setting default value on a field?

感情迁移 提交于 2019-12-11 05:48:23
问题 I'm adding a new field to an existing Table (not a "core" one, but one that was created by an inhouse dev previously) and I'm trying to set a default value for it. I created a field of type Int , but now by default it's all 0's for the records that are already there. Is there any way to define a default value for that field, for all the existing records and to be inserted records ? Ultimately, what I'm trying to achieve is that I want a configurable field (ShowOnReport) so certain records won

Using environment variables in AX

爱⌒轻易说出口 提交于 2019-12-11 05:46:35
问题 Is there any possibility to make use of windows-environment-variables in AX? Example : Property NormalImage on a MenuItem . I'd like to use sth. like %USERNAME% instead of the explicit username. In Classes for example I can use the WINAPI macro and refer to a user-folder-variable, eg CSIDL_MYPICTURES , to access the path per user. In AOT-object-properties there's no possibility to reference to macros... Any way to achieve this? 回答1: No, you can't do this on the AOT. You can change some

Iterating over any table

微笑、不失礼 提交于 2019-12-11 05:14:52
问题 I just started new job where they use dynamics ax 2009. I am new to this technology. Is there a way in x++ to iterate over any table? I don't know where the data comes from, it's lenght nor field count. What I mean by that is I need a function that would behave like this void convert(Table anyTable) { int i=0; int k=0; ; for(i; i < anyTable.Lenght; i++) { for(k; k < anyTable[i].Count; k++) { //some xml processing } } } (By Table i mean some kind of parent of all tables). And that basically is

Query object not working as expected?

Deadly 提交于 2019-12-11 04:48:19
问题 This code should be able to run on any AX system (change item & warehouse). The issue is that CustInvoiceJour is not being returned sometimes. What is odd, is if I just do a "select custInvoiceJour" with the same relations, it DOES find it? How is this possible? static void Job59(Args _args) { CustInvoiceTrans custInvoiceTrans; CustInvoiceJour custInvoiceJour; InventTable inventTable; QueryBuildRange rangeItem; Query query; QueryBuildDataSource qbds1; QueryBuildDataSource qbds2;

How do you reset the workflow status of a purchase requisition from completed to submitted programatically in X++?

送分小仙女□ 提交于 2019-12-11 00:52:41
问题 MS Dynamics AX 2009: I need to do this from the Purchase Order Screen, so I only have the Purchase Requisition number available from the PurchLines Table. Your help would be really greatly appreciated as there is nothing yet on the net available (that I can find) and there are missing classes in the AX 2009 Tutorials. All helpful answers will definitely get an upvote from me. Edit: Purpose is to force the existing workflow to re-execute on the Purchase Requisition from "Submitted" stage when

Axapta 2009 X++ download text file from a website

主宰稳场 提交于 2019-12-10 20:08:53
问题 I would like to download a text file from a website, given I know the URL of it. 回答1: There are a few examples in Axaptapedia.com, loading Web Documents. The examples use the Microsoft .NET Framework. The code below is from Axaptapedia: public static void TEST_DownloadString (Args _args) { System.Net.WebClient webClient = new System.Net.WebClient(); ; info(webClient.DownloadString('http://axaptapedia.com')); } 来源: https://stackoverflow.com/questions/8253012/axapta-2009-x-download-text-file

Hide form tabs for specific user groups

只愿长相守 提交于 2019-12-10 14:39:26
问题 There is requirement to hide certain tabs for certain user groups on a form. Thing is, hiding all the fields in the tab does not seem to work. Any ideas are appreciated. Working with AX 2009. 回答1: In case anyone needed an answer to this with visuals: In AX you can assign a security key to a tab via the properties sheet: Then you can either make use of existing security keys or create your own in order to control user visibility by assigning only the users you want to see the tab to have