x++

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)); /

“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 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

How to get RecId selected from lookup method?

拥有回忆 提交于 2019-12-25 13:18:22
问题 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

How to get RecId selected from lookup method?

回眸只為那壹抹淺笑 提交于 2019-12-25 13:18:13
问题 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

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

How to refresh/Synch View based on a Query with dynamic range?

和自甴很熟 提交于 2019-12-25 05:36:14
问题 I have a simple View with a Query , my custom Query has a Dynamically Range . In class SysQueryRangeUtil I have insered a my custom public static method and copy it in my Custom Query. This range, work well. But I have a problem, when the range condition change, if I want to see the new view(with new selected record) I have to Synch, in AOT my View. But this operation can't do a simple SystemUser. There is a way to use a dynamic range in a View and not constantly synchronize ? My dynamic

AOT Query relation OR case

≡放荡痞女 提交于 2019-12-25 03:16:37
问题 For example I have the following x++ query. Select EcoResproduct join tableX where EcoResproduct.RecId == tableX.Product || EcoResproduct.RecId == tableX.DistinctProductVariant; Is that possible to do the same thing through AOT query without using a union query or adding two times the same datasource and without using QueryBuildDataSource object and X++ at all . Thanks in advance PS: I made my question more clear. 回答1: Initial incorrect answer: Is that possible to do the same thing through an