x++

How to use RecId as a foreign key in a form

醉酒当歌 提交于 2019-12-12 16:26:08
问题 I have a table of items that each reference one other item in another table. We'll say the items are people, and the related items are favorite foods. Table A: Bob:1, Sally:1, Sue:3 Table B: 1:Apples, 2:Bananas, 3:Oranges The "people" are tied to their favorite "foods" by the food RecId, refererenced in the People table. I have a form/grid for editing people. Is there a way to cause the FoodRecId StringView in the grid to convert its value so the RecId numbers are not visible in the grid? I

Add custom text to AX 2012 drill-down links

為{幸葍}努か 提交于 2019-12-12 05:02:22
问题 I want to customize the standard drill-down functionality and add a text parameter to the drill-down URL. I will then parse and use the parameter in the SysStartUpCmdDrillDown or EventDrillDownPoller class like the solution provided by Jan B. Kjeldsen in this question. The standard drill-down link is dynamics:// Target /?DrillDown_ RecID / : dynamics://0/?DrillDown_5637230378/ In previous versions of AX it was possible to modify the RecId to custom text and parse the text once the client is

Dynamics AX 2009 X++ Page Counter Query

£可爱£侵袭症+ 提交于 2019-12-12 04:36:35
问题 wondering how to carry out this requirement if at all possible. I am modifying the Customer Account Statement morphx report, and the user has requested that we have a Page of Page, i.e. Page 1 of 10, Page 2 of 10 etc etc... What we need is for the report to reset the total pages after it fetches a new customer. So Customer 00001 might have a 3 page statement, which would be "Page 1 of 3" "Page 2 of 3" and "Page 3 of 3". Customer 00002 might only have a page statement so it will be "Page 1 of

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

Axapta 2009 X++ Reverse only selected PackingSlip

孤人 提交于 2019-12-12 01:10:45
问题 How to modify X++ AX so it will correctly pick the right packing (if I know the PackingslipId)? For example, I'm doing 3 times packing for an item with different quantity like this: 1. Qty=50 2. Qty=20 3. Qty=30 Then I want to reverse Packing #2 (Qty 20), currently AX will deduct Packing #1 and that is wrong and not what I wanted, because I what I did is reversing packing #2 and I do not want to deduct from any other packing slip at all. Currently there is two solution I know to reverse

Store Keystrokes in X++

只谈情不闲聊 提交于 2019-12-11 20:14:50
问题 Does anybody knows how to store keystroke as a string in X++? And also if I want to covert them to ASCII and vise-versa. And the below job does not shows the expected behaviour. public void textChange() { int i, j; int L = 12; int h = 4; int t = 54; str tmpStr; ; i = strLen(strKeep(seField.text(), '\n')); info(seField.text() + ' Lines: ' + int2str(i)); super(); if (i >= H) { error(strFmt("max lines = %1", h)); } } Actually i am trying to implement something like- in a textChange method of

convert SQL Query with Join to X++ Dynamics AX scripting

五迷三道 提交于 2019-12-11 19:09:15
问题 I have a SQL query that is not that simple as it contains Join SELECT * FROM table1 a inner join table2 b on a.field1 = b.field1 inner join table3 c on a.field2 = c.field2 inner join table4 d on c.field3 = d.field3 inner join table5 e on c.field4 = e.field4 WHERE a.location = 'asia' AND b.modType = 1 and c.discount = 'sample' and d.name = 'hello' and e.name in ('one', 'two', 'three') I like to convert it to X++ scripting, here's what I did while select forUpdate table1 join table2 where

How do I remove diacritics from a string in dynamics ax

你。 提交于 2019-12-11 16:28:04
问题 I'm trying to convert some strings, I'd like to be able to remove diacritics from strinf. (Exemple : éùèà would become euea) i have try this : static str AALRemoveDiacritics( System.String input ) { int i; System.Text.NormalizationForm FormD; str normalizedString = input.Normalize(FormD); System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); for (i = 0; i < strLen(normalizedString); i++) { System.Char c = normalizedString[i]; if (CharUnicodeInfo.GetUnicodeCategory(c) !=

D365 FO Simple Query for expiring contract

微笑、不失礼 提交于 2019-12-11 15:51:25
问题 I need to create simple query which will show all contracts which will expire in next 3 months. I know how to do that with SQL, but how to do that in Visual Studio when I create query. I added data source Contract table. Added range. Column where is date about expiring is VALIDTO. So, something to write up in value, or how to do that ? 回答1: Solved with two ranges on VALIDTO column. Used (MonthRange(0,3)) with (Day(0)) formulas. 来源: https://stackoverflow.com/questions/56889905/d365-fo-passing

Get customer or prospects in Dynamics AX 2012

谁说我不能喝 提交于 2019-12-11 13:25:03
问题 I am trying to get customer or prospect using X++ and use it on a lookup. There is a method in the DirPartyTable that returns what I want. DirPartyTable::isCustomerOrRelation while select * from dirPartyTable { if(DirPartyTable::isCustomerOrRelation(dirPartyTable.RecId)) { //Get the Name //info(dirPartyTable.Name); } } But when I build a query to the lookup I am trying to pass the DirPartyTable::isCustomerOrRelation(dirPartyTable.RecId) on the addRange of the query somehow. Is there a way to