dynamics-ax-2012

Example for Dynamics AX 2012 QueryService through C# - Relations and JoinMode usage

≡放荡痞女 提交于 2019-12-11 19:42:04
问题 Trying to access AX 2012 QueryService through c# application and would like to get CustomerID and Customername fields only. Problem is, CustomerID is in CustTable and CustomerName is in DirPartyTable. Any help to article or code samples would be appreciated. Reference to QueryDataSourceMetadata to put join in these tables and get data. What are the options and when to use Relations and JoinMode? I searched in MSDN and it just lists the property names and methods and not much help in the form

how to create two number sequences

与世无争的帅哥 提交于 2019-12-11 16:23:06
问题 Can we create Purchase order Number Sequence with the division capture for Local and Foreign purchases? Can we create two number sequence at a time in AX 2012 ? 回答1: Yes you can. Not knowing anything about your version or what you have done or tried, I will try guessing you are using AX 2012. Then go looking in \Classes\CustPostInvoice\run on how they set the invoiceId variable. if (countryRegion_LTLV) { [invoiceId, voucher] = this.getNumAndVoucher_W(numberSeq); } else { [invoiceId, voucher]

What is the right way to access buttons in list page form?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 13:34:38
问题 In ax 2012 in form with template " list page " you normally cannot access the clicked method on the button. You are just not allowed to overwrite method `clicked You can change this behavior by setting the button property "DisplayTarget" to the value " Client ". Than you can change the code of clicked method. But it does not feel right. Is there any way how to access clicked method better way? For example by using *FormName*ListPageInteraction which is linked in form properties? P.S.: I know

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

How to connect Visual Studio to a specific dynamics ax environment

天涯浪子 提交于 2019-12-11 13:01:53
问题 I would like to connect my Visual Studio against different dynamics ax environments. In particular the following two: Development Environment Production Environment The purpose is to develope SSRS reports. In the production environments there are some reports which are not available in development and it would be complicated to create them. Not meaning that I'm going to develop against production (who would do such a thing?! ;-) ). I found a tutorial which shows how to connect to a specific

How to filter in execute query by Date range value?

旧城冷巷雨未停 提交于 2019-12-11 12:13:21
问题 I have to made a Query in executeQuery , and I have to filter by date field, my code is : public void executeQuery() { utcDateTime dateUTC, datenullUTC; query q = new Query(); QueryBuildRange qbr; QueryBuildDataSource qbds ; QueryRun queryRun; dateUTC = DateTimeUtil::newDateTime(_dateValue, 0, DateTimeUtil::getCompanyTimeZone()); qbds = q.addDataSource(tableNum(MCRCustCategory) ); qbds.addRange(fieldNum(MCRCustCategory, ValidTo)).value(strFmt ("> %1", dateUTC) ); queryRun = new QueryRun (q);

Dynamics ax2012:How to export data using Runbasebatch

一个人想着一个人 提交于 2019-12-11 11:55:56
问题 I'm using Data Import Export Framework in Microsoft Dynamics AX 2012 in order to export custom data (TestTable) from ax to file. I successfully did that. Now I want to create a Batch job manually and then assign Batch job tasks for Staging job and Export job to execute this export in background. I don't know how to implement it, now I'm trying to create my own batch by duplicating Tutorial_RunbaseForm class. To learn how to set up execution jobs as batch jobs in AX I've started with Staging

How to reset a page number in SSRS report

こ雲淡風輕ζ 提交于 2019-12-11 09:09:22
问题 I create a report using SSRS reports to show many different kind of information, I use a multiple headers and many tablix that will be used for each page on report. My page number is not based on group (I use the page number generated by SSRS because I use to put it in the header). My problem is how to reset a number page for each header. 回答1: There are (at least) two options: The first uses page names, described here. The other involves subtracting an offset from the buildin function,

AX 2012 - ListPage FactBox Part does not refresh on Sub Datasources selection change

旧城冷巷雨未停 提交于 2019-12-11 07:17:50
问题 my issue is on the ReqTransPOListPage, I added a FactBox Part related by ItemId When the user navigates in the Grid records - If the selected field on grid is one of the main DS ReqPO then the FactBox get refreshed! - But if the selected field on the grid is a field of any sub DataSource of Query, then PCDataSourceEventNotify.onRefresh() is not triggered and neither my FactBox. I can't even force refresh in ReqTrans_DS.active() since it's a ListPage based on AOT Query and datasource methods

How to Calculate current Sales Price of item from Code (after evaluating all trade agreements and discount offers)

陌路散爱 提交于 2019-12-11 05:09:03
问题 I need to develop a SSRS report which will list all items and their sales prices, some items have discount offers, some have trade agreements and some items have both applied on them, I am wondering if there is a built-in method which will return current sales price after taking all offers and trade agreements into account. any code example would be much appreciated. 回答1: The logic for finding trade agreements is contained in class PriceDisc . It also has a fallback if no agreements exist. On