Querybuilddatasource join. This has been entered through all released products.

Querybuilddatasource join D365FFO – AX – QueryBuildDataSource SortOrder syntax. Here is my code which isnt working: public void executeQuery() { I have to build a specialized form which queries the InventTrans table for some purchase transactions. Still, I want to use CustTableCube (or other queries with outer join, which I presume to cause the problem). To use the special syntax, you should first add a range to your QueryBuildDataSource object in the normal way. My question: How does an AOT query read the records written into a data source that is a TempDB table?. relations(false); . (This is just an example, PurchLine actually has it’s own intercompany origin field. queryBuildDataSource(). clearRange(fieldNum(InventTable, D365 FO - X++ Join multiples tables with same table using query build data source This tutorial discusses how to address a common query creation issue by using the query build data source in Dynamics 365 Finance and Operations. I need to create filter which display only active BOMs in grid and I looking for solution. Priot to Ax 2012, this was not possible to achieve using the standard query ranges. firstFast in the Dynamics. Application. Make sure that the user has access to the development security key (SysDevelopment) before this API is called. addDataSource(tablenum(ProjectContractInfoView QueryBuildDataSource qbds; InventJournalTrans InventJournalTransLoc;; q = new Query(); The join criteria is only applied in the second half of the expression, so all Service items will appear irrespective of whether they have a bar code. i added a new dataSource in PurchLineOpenOrder Form. SalesId == salesTable. Blocked == CustVendorBlocked::No // DataAreaId along with Partition, are automatically included in the query context depending // on the company context you're executing the code from // && vendTable. querybuilddatasource. It covers how to join multiple tables, including the base table, Learn more about the Dynamics. joinedDataSources in the Dynamics. fetchMode in the Dynamics. relations in the Dynamics. Data sources are arranged in hierarchies that define the sequence in which records are fetched from the tables It produces the following query. - Law of electronic communication, for ANEGIS sp. 3 How to Delete records using Odata Dynamics NAV 2017 web services. As per my understanding Query is good enough, as per coding best practice you should remove range value "=0" and "=1" to QueryValue(NoYes::No) and QueryValue(NoYes::Yes) which is equivalent as per your requirement [FormControlEventHandler(formControlStr(TRGSysMailerMessageEditor, TRGTo), FormControlEventType::Lookup)] public static void TRGTo_OnLo You can create a display method on the CustTrans table instead of joining a new data source, e. 1) all sales lines which has all status, except invoiced and cancelled and 2) all sales lines which has status = invoiced, and invoiceDate(in CustInvoiceJour) >= today This is a method of specifying ranges on queries which allows you to perform complex comparisons, and create complex join situations which would be impossible using the standard syntax. André Arnaud de Cal 291,074 Super User 2024 Season 2 # 2. , first selecting some data and then putting conditions over it hello. I post my code into this blog, please show me where i am wrong? Many thanks for your support. qbdsPurchTable = query. This returns a row when there is a match in both tables. But, get a strange problem. Once I come across the situation where there I have to build query using QueryBuildDataSource(qbds) with multiple tables and even same table with multiple join. addGroupByField(fieldNum(CTable, Val)); Now comes the strange behaviour I have and the actual point of my question. OrderAccount join Name from partyTable where Multi Table lookup - Where you can set lookup field from multiple table by joining multiple table and create a multi table lookup using SysMultiTableLookup. Hi All, I have a requirement to import Credit Card transactions into D365FnO which uses the how can I join these data sources by code i. But, in debug, I can see query like this, it's joined on different field. Hello Experts, I want to make two relations in a query using InventTransId and ToInventTransId like this. For instance the following code Query q = new Query(); QueryBuildDataSource reqTransDs = q. this query will be the datasource for the form . Try synchronizing, compiling and/or restarting your client/aos. 7. The QueryBuildDataSource should have the same name and table ID as the FormDataSource. Nevertheless if you use descriptive names of variables (as you I want to add another data source in Query prompt. Featured topics. firstonly(true); //add another datasource into your query object. 1 Expressions in a querybuildRange. " You could use "Outer join" instead of "Delayed" then change the join mode programmaticly when there is search for fields on HRMVirtualNetworkTable. nmaenpaa 101,156. TreeNode. If you need to show two fields from two data sources I recommend you to create a form lookup. The data sources are specified by using QueryBuildDataSource objects. (AttributeGroup = Product), this is not right. to send me commercial information (among others, offers promoting services and goods), including direct marketing - to the e-mail address and mobile phone number provided by me in the sent form. Product updates. This will return all rows from the left table, even if there is not a match in the right table. The FormBuildDataSource class lets you create, read, update, and delete X++ code and metadata. addDataSource : int -> Dynamics. select firstOnly * from inventTable where (inventTable. Learn more about the Dynamics. public virtual Dynamics. o. And I only noticed after re-checking, having read your last post :-) So my recommendation, check Dynamics AX 2009: Or Exist Join in QueryBuildDataSource. I am trying to write a query that retrieves an item based on ItemId or item barcode. joinMode(JoinMode::InnerJoin); . QueryBuildDataSource qbds2 = qbds1. querybuildDatasource hcmWorkerDS; Query query; 2. How can I solve this problem please? I tried to put the join mode in the constructAllCarTypes method to exists join for the second and third datasources to no avail. Can be linked to another QueryBuildDataSource object to join linked data sources. AccountNum == this. Search Learn more about the Dynamics. rightOuterJoin in the Dynamics. Temporary TempDB Tables [AX 2012] states that A query under AOT > Queries can reference a TempDB table as a data source. queryBuildDatasource = This tutorial discusses how to address a common query creation issue by using the query build data source in Dynamics 365 Finance and Operations. joinMode in the Dynamics. 1. The view looks like this: QueryBuildDataSource qBDSource; QueryBuildRange querybuildRange; CustAccount customerID; int i = 0; customerID = "1010-1010123"; query = new Query(); qBDSource = query. All responses (4) Welcome to join hot discussions in U’}QdЮtÚ ˆ*’“V €ªEBæ «?~ýùç¿¿ ŒÝ ±Žëùþ+ ëùµnV±« ’Kþ€(Ü8 ÿ ‚ÈGG‡)«“œ„†¤;vwH KÕÛ­ÞzñþÌÔ¾³|9½¦' Ô!H \DQ‘RŽ²8=vâ±ÓîÞU ñD!& ~Ô’å:uŸÃá8 þZõ ?_oÞN i ˆs6 ,çî ë^u¬@"f & û ¿lZ ž½œÞö IjÔ- $~ˆi ¶å vÀPÆLÞÿ}Û¾oùùº23 îlN}n€+ÈR6õðÒ&@!]LR (W¾ég¨ªoåläR • ã—q¦òˤ‹ÚLðÞ¾ QueryBuildDataSource qbds1; QueryBuildDataSource qbds2; QueryBuildDataSource qbds3; ; qbds1 = query. abstract member addDataSource : obj * string * bool -> Dynamics. I need to remove a group by statement from a QueybuildDataSource object. If I create a new query with just CustTable on it - it works fine. addDataSource(tableNum Small and medium business | Business Central, NAV, RMS Negative inventory value with no remaining quantity. Type safety not included In X++ you can use the SysQuery framework to build SQL queries at runtime. // Set the join mode. It may be returned by a function, but I doubt it will solve your hidden (unstated) problem. Viewed 4k times 5 . On an empty field, the group by is correctly executed and I get this: A B C I created a new form with datasource (PayrollEarningCode) I need to add range to this data source to filter by active earning code or getting all earning code earning code so I added this code to execute query but it doesn't work well . I would like to add and remove range & join in datasource. FROM InventJournalTable(InventJournalTable_1) . QueryBuildDataSource reasoncode; QueryBuildDataSource inventTransWMS; SysTableLookup sysTableLookup; ; super(_formControl, _filterStr); AX 2012 - Multi Table Lookup - Join many multi with root table to display a lookup on root table. The form has a custom field "Profit center" which is reference group but this reference group has no data source. I think that the problem is in CustTableCube, which has outer join on its datasources. Filters that are specified on the WHERE clause are applied later in the process than filter Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI features for Teams; OverflowAPI Train & fine-tune LLMs; Labs The future of collective knowledge sharing; About the company Condition: We'd like to have the following results. No comments: Post a Comment. If I use an inner join, it will only show records with data joined. When I launch a form I open the prompt Query. addDataSource(tableNum(InventTable)); qbds. Lookup table on form datasource field. AddDatasource() And i want to remove this datasource from the query based on a condition. joinMode(JoinMode::InnerJoin); //whether we want to use auto relations between table (i. I'm facing same issue of your topic. 16. e. datasource. Trying to join firstonly using AX query object. ItemId == _upc || inventItemBarcode. The problem that I have is that the AOT query seems unable to read any record from my TempDB table Learn more about the Dynamics. True) or to create link by your own as mentioned below (i. You can do it programmaticaly by joining QueryBuildDataSource or by extended filter (Alt+F3, Right click on datasorce, 1:n and find sev\condary DS) Share. addDataSource : obj * string * bool -> Dynamics. Inside the execute query, write the following code: QueryBuildDataSource queryBuildDataSource; // Set the data source to your custom table (your_tableName) queryBuildDataSource = this. queryBuildDatasource. You can use computed columns if necessary. ItemId; Join – This is the same as an ‘inner join’ in T-SQL. dataSourceTable(tablenum(reqPO)); Hi, I know it is very old post, but I'm new in AX. static void QueryExample(Args _args) { Query query; QueryBuildDatasource datasource; ; query = new Query(); // Add SalesTable main datasource datasource = query. . That's why X++ ignore the link. group by clause in X++. The following code provides the same output as the while select statement that is indicated in the comments. ON What I'm trying to do is to add this code to the child datasource: QueryBuildDataSource qbdsIT, qbdsERPTC; qbdsIT = queryBuildDatasource = query. Syntax. However, in the X++ language the word ‘inner’ is not written. The value property can be used to set the string that defines the range. addDataSource(tableNum(salesTable)); Join Two Tables at Run Time-Harry. How can I do that? Thanks :) How to join Two tables at RunTime, without using Datasource static void QueryJoin2Tables(Args _agrs) {AxTestTable1 AxTestTable1; // Table 1 AxTestTable2 AxTestTable2; // another table which you want to join with table 1 Query q; QueryBuildDataSource qbdAxTestTable1, qbdAxTestTable2; // objects for both tables QueryBuildRange qbr; Remarks. Application namespace. newquerybuilddatasource = querybuilddatasource. Otherwise AX will not know what value to select because multiple Remove a "group by" statement from QueryBuildDataSource at runtime. addDataSource(tableNum(SalesTable)); // Add child datasource "SalesLine" to previously created DS datasource = datasource. static void Query_Example(Args _args) { Query q; Queryrun qr; QueryBuildRange qbr; QueryBuildDataSource qbds; InventTrans iv; Real Total; str range; /* The following query produces the same results as: while select sum(qty) from inventTrans where For example, you only want to see lines from derived intercompany orders. Query q = new Query (QueryStr(queryname)); , instead of to the ON keyword of the JOIN clause. The advantage is that we let the SQL server do some filtering and receive less records compared to the old-school version were we had to receive all records and then use an IF or the likes to filter away the records that did not match In addition to the good answers already provided, I highly suggest to use a tempory table (type TempDB) and then join your query/select statement on RecID. JOIN * . Lets see the select statements with crosscompany's use. init() and add this code: The only difference is that in sales order main data source is SalesTable and need only one join to the mapping user table but CustInvoicejour is the main data source of the find sales order and needed firstly to join SalesTable. query(); I was pretty desparate until I noticed I was joining fieldNum(ProdTable, ProjId) when actually wanting to join fieldNum(ProjTable, ProjId). The following example creates a query object that is used to create a QueryRun object. QueryBuildRange: Enables the end user to limit the result by adding a value in the specified query range. Query object not working as expected? 1. validTimeStateAsOfDate(_dateValue); super(); } If you have an interval, use this instead: this. Microsoft Dynamics 365 | Integration, Dataverse, and general topics How import VISA VCF plain text credit card statement into D365FO X++. It may seem that in Dynamics AX transaction records (CustCollectionLetterTrans and CustTrans) are fetched separately, however according to SQL Server query all records are selected from database simultaneously. addDataSource(tableNum(PurchTable)); //adding <PurchLine> table into the datasource of previously created datasource. This is the code I have tried in the initialized data source event: FormDataSourceEventArgs e) { QueryBuildDataSource qbds = sender. This class lets you create, read, update, and delete X++ code and metadata. It covers how to join multiple tables, including the base table, HcmEmployment table, and Leave Plan table, using A frequently used method can hide twisted secrets. I have multiple products with zero units in Learn more about the Dynamics. QueryBuildDataSource. queryBuildDataSource3. Note: QueryRun. changed method is used to determine whether datasource has new value and is described on msdn. Announcing Mentions and Quick Responses! Leaderboard # 1. dataAreaId == curext() join Name from Learn more about the Dynamics. QueryBuildDataSource = query. Last replied Posted on by Esteban Navarro 233 . Outbound to Real-Time Transition Note: This forum will be merged into the Customer Insights – Journeys forum soon. addorderbyfield(fieldnum(yourtable, yourfield),sortOrde::descending); if not, then ignore the message Dear Martin Dráb, I agree with your suggestion, Could you please explain in brief how to use it in Query, Actually i have to show the e-mail id's(worker and supplier) as lookup based on the status the user selects. All responses (4) Declare querybuildDatasource object in the class declaration of the form. IF(!chkViewAll. Query datasource property FirstOnly is ignored in SQL Server query. For a join query, the join mode of the second level data source must be either exists or notexists. Improve this answer. orderMode(OrderMode::GroupBy); QueryBuildDataSource. joined in the Dynamics. public: virtual void clearRanges(); public virtual void clearRanges (); abstract member clearRanges : unit -> unit override this. ) You could add an additional PurchTable datasource to the form, and join the datasources in the form properties. Custom Lookup and Group By. dataSourceTable : int * int -> Dynamics. By Deepak Agarwal - May 22, 2013. validTimeStateDateRange(fromDate, toDate) Your code as provided in the question does not do anything at all, as the form does [DataSource] class SalesLine { /// /// /// public void init() { QueryBuildDataSource qbds; QueryBuildDataSource qbds_SalesLine,qbds_CustInvoiceTrans; super(); do you also add that datasource with join on form design? If you want to add salesline to the grid, you might add it in form design first, then use code to get that DS and link to Remove a "group by" statement from QueryBuildDataSource at runtime. QueryBuildDataSource Public Overridable Function dataSourceTable (_table As Integer, _occurrence As Integer) As QueryBuildDataSource Parameters. If you defined the datasource in the form (using InventTableComplaint as JoinSource and with OuterJoin as JoinMode), you do not need to do it in init method either, but you may need to define the link if not provided as table relations: //Specifing which type of join you want to use in between both of the above datasources. This is using x++, Dynamics AX 2012 R2. Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI features for Teams; OverflowAPI Train & fine-tune LLMs; Labs The future of collective knowledge sharing; About the company Join SalesTable and SalesLine; Join CustInvoiceTrans; Print out SalesLines SalesID and NCAdditionalText; static void Job2(Args _args) { Query query = new Query(); QueryBuildDataSource queryBuildDSSalesTable; QueryBuildDataSource queryBuildDSSalesLine; QueryBuildDataSource queryBuildDSCustInvoiceJour; XDSSalesTable xDSSalesTable; Query q; QueryBuildDataSource qbds; QueryBuildDataSource qbds_Joined; QueryBuildFieldList qbfl; Map fieldMapping; q = new Query(); qbds Learn more about the Dynamics. Posted on by SachinMittal 15 . Hello everyone, Thanks in advance for any help. so , i want to create a new relation from PurchLine to EcoResProduct in init() method i added next lines , maybe the code is wrong !!. All Companies through Select Statement:This job will access all XDSSalesTable xDSSalesTable; Query q; QueryBuildDataSource qbds; QueryBuildDataSource qbds_Joined; QueryBuildFieldList qbfl; Map fieldMapping; q = new Query(); qbds abstract member dataSourceTable : int * int -> Dynamics. clearRanges : unit -> unit RE: The required QueryBuildDataSource was not found in the Query associated with the FormDataSource . Static void TestQuery(Args _Args) { Query query; QueryBuildDataSource querybuilddatasource. axapta; dynamics-ax-2009 The same happens after the third iteration. 1) CrossCompany:CrossCompany keyword is access data from more than one or all the companies data which company specific. addLink in the Dynamics. Note: I believe it can be implemented only using multiple queries. Martin Dráb 229,786 Most Valuable Professional # 3. no VendTable and only specific fields from the other 3 tables. Furthermore, I wasn't able to find With AX 2012 we now have the option of using HAVING in a query. QueryBuildDataSource addDataSource (int num1); abstract member addDataSource : int -> Dynamics. FROM InventJournalTrans(InventJournalTrans_1) . Outer Join – This is the same as a ‘Left Join’ in T-SQL. Load 7 more related questions Show fewer related questions Sorted by: Reset to default Know someone who can answer? Share a Actually in AX all customers are fetched per customer group. In other scenarios (form delayed joins) you could use the addDynalink There is no reason (I can think of) this should work, the selectionfield should be added to your querybuilddatasource. i will share my code. i set the join property in both the query and form datasources Mea_ 60,278 on at Like ( 0 ) The data sources are specified by using QueryBuildDataSource objects. i set the join property in both the query and form datasources Mea_ 60,278 on at Like ( 0 ) "The required QueryBuildDataSource was not found in the Query associated with the FormDataSource . When it comes to applying this kind of relations, from the query interface it is straightforward. addRange(fieldNum(MyTable, RecId)); Join SalesTable and SalesLine; Join CustInvoiceTrans; Print out SalesLines SalesID and NCAdditionalText; static void Job2(Args _args) { Query query = new Query(); QueryBuildDataSource queryBuildDSSalesTable; QueryBuildDataSource queryBuildDSSalesLine; QueryBuildDataSource queryBuildDSCustInvoiceJour; I try to build a query to join multiple tables. VendTable join PurchTable, VendTable join VendTrans, and VendTable join VendInvoiceJour in a union, or decide to use a different union structure e. public void executeQuery() { this. SalesId && salesLine. g. You can do such things, but you need now to make sure, that both data source gets its data from the QueryBuildDataSource salesLineJoined; 2. For example, you only want to see lines from derived intercompany orders. : //BP Deviation Documented display CustName orderAccountName() { CustTable custTable; DirPartyTable partyTable; select firstonly Party from custTable where custTable. Leaderboard . By the simple joins it populate wrong data output (multiple row for We want to link base table with both hcm employment (child1) and leave plan table (child2) using query build data source. public void lookup() { Query query = new Query(); QueryBuildDataSource dsCustTable; QueryBuildDataSource dsCustTrans; // Instantiate sysTableLookup object using table which will provide the visible fields SysTableLookup sysTableLookup = The next showcase is an example of how you can join, in X++, a data source to another data source that is one or more levels above it’s nearest parent in the hierarchy of a query. Is there any method to do this? (The opposite of addGroupByField). Ask Question Asked 13 years, 1 month ago. Every easier is adding the following to the init of the PurchLine The ProjTable will be the parent table and will join the other three tables I listed above. Here is the code for multi table look. So I switched it to an inner join link type and I am now getting the error, "Query missing QueryBuildDataSource for FormDataSource InventTable. I run code to the line of 30 . example: public void init() //on form datasource reqPO { QueryBuildDatasource QBDSReqPO; ; super(); QBDSreqPO = this. You can join to other tables in your query, see below example from Axaptapedia. Find DS and field whose is ID on lookup and override modified() method Below is an example for how to create a x++ query in AX. All Join Two Tables at Run Time static void theAxapta_JoinTables(Args _args) { Query query; QueryBuildDataSource queryBuildDataSource1, Below are two simple X++ queries which either build a query by adding a datasource or by calling a query object. These are pretty basic but I think they could help some people out. query(). False) Join us in the Community for an AMA: December 12th Register Today. i have noticed i can do this by inserting fields into the range node of the view->metadata->datasource, but i kinda want it so that if the first block of filter-code doesn't return TRUE, then go for the next block of filter-code, since i have added the parentheses to each "block" of code so that all code wrapped in parentheses need to return true, if not, "check this Determines whether the records fetched by this data source can be updated. how can i do it by code? I can't find a method related to clearing datasource from a query. The QueryBuildDataSource should have the same name and table ID as the FormDataSource The join mode in union query is invalid. 04. Modified 3 years, 1 month ago. The second argument to the addLink method must be an field of the current datasource table. 1) Lookup without Join Query query = new Query(); QueryBuildDataSource queryBuildDataSource; VendTable vendTable; DirPartyTable dirPartyTable; while select AccountNum from vendTable where vendTable. WHERE ((JournalType = 2)) . LineAmount == 100 X++ does not support exists clause as a subquery in the where clause. Open on init datasource method public void init( { super(); queryBuildDataSource qbds, qbds1; qbds = table1_ds. // Add link between parent field and child field. QueryBuildDataSource: Links to one data source in the query. Syntax To use the special syntax, you should first add a range to your QueryBuildDataSource object in the normal way. // Assuming you are working with a QueryBuildDataSource object queryRange = queryBuildDataSource. Below is the code used for performing this operation. QueryBuildDataSource Public Overridable Function addDataSource (_arg As Object, _name As String, _emptyFieldList As Boolean) As QueryBuildDataSource Thanks for your helpful post. เริ่ม ต้นเขียนโปรแกรมกับ กับ X++ เรามาทำความรู้จักภาษาที่ใช้ ใน การพัฒนา Axapta นั่นคือ ภาษา X++ ถูกออกแบบโครงสร้างคล้ายกับ JAVA ซึ่ง X++ มีโครงสร้าง แบบ object We use AX 2012 R3. But the values will be blank in the column. This example : Query q = new query ();QueryRun qr;QueryBuildDataSource qbds;QueryBuildDataSource qbds2;QueryBuildDataSource qbds3;QueryBuildRange qbr; qbds public class QueryBuildDataSource : Dynamics. This has been entered through all released products. " As i understand, we have to add the data sources to the query as well along with the data sources on to the form dynamically. addDataSource(tableNum(ReqTrans)); This is a method of specifying ranges on queries which allows you to perform complex comparisons, and create complex join situations which would be impossible using the standard syntax. QueryBuildFieldList: List of all the fields in data source. value()) {qsp = qss. This allows us to limit a result set based on aggregated fields. Every easier is adding the following to the init of the PurchLine QueryBuildDataSource cpj; QueryBuildDataSource bol; query query; query = CustPackingSlipJour_ds. QueryBuildDataSource override this. AX. You can use VendTable as a parent datasource, i. without using properties of form data sources ? *This post is locked for comments. // Indicate you don't want to use relations automatically. Labels: X++. Following the example above, let’s say we want to join TaxTrans Learn more about the Dynamics. D365FO – AX – Multiple tables join with Query AddLink syntax example. addDataSource(tableNum(PurchTable)); qbdsVendPackingSlipTrans = framework has made two separate queries, your code is going modify the join mode from one query's data source join mode property. adddatasource(tablenum(yourtable)); //to fetch the last record. I tried my best with your guide, but it didn't work. Queries are used when the user wants to modify the records that are fetched by, for How to build query with multiple values. How to select aggregate fields using query? 1. In my form init method I have: QueryRun queryRun; super(); queryRun = new QueryRun(TableA_ds. The transactions must be selected, either with a non-empty Voucher, either with a non-empty Packing slip Id (PackingSlipId). You do not define the table relations in the executeQuery method, do so in the init method instead which is executed exactly once. Be carefully if you use InnerJoin, the query returns the record with only relation having TRUE, so, it's right to having only one record (you've only match between record). Try to use outerjoin. addDataSource(tableNum(SalesLine)); // Set the join QueryBuildDataSource (Join Table and Add Range) Test run with Job static void QueryDBJoin(Args _args) { str strTemp; InventTable itemTable; Query query; QueryRun qr; QueryBuildDataSource qbds; query = new query(); qbds = query. For this aim, I try to outer join WMSArrivalOverviewTmp to purch table and add Range. itemBarCode == _upc) outer join inventItemBarcode where inventItemBarcode. Conclusion 1. q Hey team, On the smmOpportunitytable form when I click new( ) option I have a custom form to create opportunities. It's nothing specific to QueryBuildDataSource class. However the results is not as I expect. Therefore it is not possible to express the exists in combination with or. In the executequery method of the datasource1, add The AX select statement supports exists join such as: while select salesTable exits join salesLine where salesLine. itemId == inventTable. Overwrite the SalesTable_ds. under query datasources i gave 2 tables . addDataSource(tableNum(InventTable)); change rest of qbds1 to qbds2. Email This BlogThis! Share to X Share to Facebook Share to Pinterest. What you have to do too though is add group by fields on the field that you want to select. applyFilter in the Dynamics. queryBuildDataSource(); QueryBuildDataSource qbdsPO; qbdsPO = I hereby give my consent referred to in article 398, paragraphs 1 and 2 of the Act of 12 July 2024. Then just select records from VendTable The first argument to the addLink method must be an field of the prior joined table, in this case LedgerTable. Last replied Posted on by Vinayd-MSFT 26 . z o. Thread lightly, and put parameters in the right order. Reply reply More replies More replies. QueryBuildDataSource Public Overridable Function addDataSource (num1 As Integer) As QueryBuildDataSource Parameters Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI features for Teams; OverflowAPI Train & fine-tune LLMs; Labs The future of collective knowledge sharing; About the company Now at C#, the response I got from QueryService was the one I said at the previous post, a DataSet (as usual) with 3, not 1 table, as you'd expect if you would've ran a SQL query using JOIN. addLink(fieldnum(InventJournalTrans,InventTransId),fieldnum(InventTransOrigin,InventTransId)); Learn more about the Dynamics. you should not use tableStr() in extended ranges, but you should use QueryBuildDataSource name as it's used as so eventually you need to remember X++ query will finally convert to an SQL query so we are going to it in the same way as SQL e. I have solution sth like this to your problem: 1. QueryBuildDataSource. As soon as I added it it would only populate for the first record. Please be aware - This forum will be retired soon, and all questions and responses will be moved to the Customer Insights - Hi folks,Let’s try to understand how CrossCompany and ChangeComany working with a simple job in AX 2012/2009. query I have added a custom field (supplier code) to the InventTable. While looking how to specify this in a query range, I found that it was possible to associate this query range to the RecId of the table. lnu gketh sxoocsn yhzce rkhtfwm rwfc ksm ftxe niygz nom