![]() When you define the report, you must know the value of the EnumType property when you define the AX Enum Provider data source. Select the node for the range, and in the Properties window, select the TransType field from the drop-down menu for Field.Ī report parameter is automatically generated for the range when the query is used in a report dataset and the Dynamic Filters property for the report dataset is set to False. In the AOT, right-click the Ranges node for the CustTrans_1 data source, and then click New Range. Select the node for the relation and verify the following default values in the Properties window. Right-click the Relations node for the CustTrans_1 data source, and then click New Relation. In the separate window, expand the node for the CustTrans table > Fields, drag the AmountMST field to the Fields node of the CustTrans_1 data source. In the CustTrans_1 data source node, select the Fields node, in the Properties window, set the Dynamic property to No. Locate the CustTrans table and drag it onto the Data Sources node located below the CustTable data source. This will produce faster running reports. You will select the specific fields that will be used on the report instead of sending all data in the table. ![]() In the CustTable_1 data source node, select the Fields node, in the Properties window, set the Dynamic property to No. Locate the CustTable table and drag it onto the Data Sources node for the query. In the new window, expand the Tables node. In the AOT, right-click the Data Dictionary node, and then click Open New Window. Expand the node for the CustTransactionData query. Right-click the node for the new query, click Rename, and then type CustTransactionData. In the AOT, right-click the Queries node, and then click New Query. Open the Microsoft Dynamics AX Development Workspace. The following procedure explains how to define the query that will be used to retrieve customer transaction data. The TransType field is from the CustTrans table, so you will add the CustTrans table as a data source. In the report, you will filter the data that is displayed based on the TransType field. You will create a query using the CustTable table as the data source. In this walkthrough, you will use a query that is defined in the Microsoft Dynamics AX Developer Workspace. There are several ways to retrieve data for reports. Microsoft Visual Studio tools for Microsoft Dynamics AX In order to view data in the report, these tables must contain data. This walkthrough uses the CustTable, CustTrans, and CustGroup tables. To complete this walkthrough, you will need: This walkthrough illustrates the following tasks:Ĭreating a report that has a column chartĬreating and configuring report parameters and filtersĬhanging the format of a report to display as a bar or line chart In this walkthrough, you will create a report to display customer transaction data in a column chart. Displaying data in a chart makes it easy for users to see comparisons, patterns, and trends in the data. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.Īpplies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012Ī chart provides a graphical representation of data. ![]() For the latest documentation, see Microsoft Dynamics 365 product documentation. Save the changes.This content is archived and is not being updated. Static async Task> ApproveRefund(Trans transaction) => In reality, this would seek approval from an external service For simplicity, approve any transaction less that £1.50 but for simplicity, I've only included one here There are actually about four methods that are called in turn, We need some extra data before calling the external service. Static async Task> GetTransaction(int id) =>Ġ => new Trans(id, TransType.Open, 1.0M),ġ => new Trans(id, TransType.Closed, 1.0M),Ģ => new Trans(id, TransType.Open, 1.5M),ģ => new Trans(id, TransType.Closed, 1.5M), static async Task Refund(int id) =>įrom transaction in GetTransaction(id).ToAsync()įrom result in ApproveRefund(transaction).ToAsync() Ignoring the Trans.Type property for the moment, the following code does the job. if anything went wrong, or the refund request was refused, it would return an appropriate code. If the refund were approved, it would update the transaction in the local database and return a success code. The method looks for the transaction in the database, then calls an external service to request the refund. I have a method that takes a transaction and requests a refund. The code here is an MRE, although very much simplified.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |