web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

JOIN not binding?

(0) ShareShare
ReportReport
Posted on by 535

So I have joined several tables for a custom grid that an outside source created and added other relationships with no problems. Then I get to where I need to add a custom field from the LOGISTSPOSTALADDRESS table.  So I add the relationship to the salestable where the RECID from LOGISTSPOSTALADDRESS joins to DELIVERYPOSTALADDRESS in the salestable. Yet I am still getting only the first record to populate. Am I missing something goofy?

pastedimage1682007793370v4.png

pastedimage1682007528868v2.png

pastedimage1682007783498v3.png

pastedimage1682007520989v1.png

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Your SQL code doesn't match your query in F&O. LogisticsPostalAddress is a date-effective table and F&O returns only currently valid records by default.

    You'll need to think about your requirement. If you want the active address, fix your SQL to return correct data, consistently with F&O. If you want your query to include old addresses, change Valid Time State Auto Query of the data source to DateRange. See Date Effective Data Sources for Forms for more details.

  • KeithM Profile Picture
    535 on at

    I tried that and still getting just that first row with data.  Would it have to be anything with the relation to the LogisticsPostalAddress table?  I also noticed that they created a relationship already with an unusual name(last screenshot). I have a feeling those may be fighting each other. Plus it has some parameters that may be causing it ?  Cardinality?

    pastedimage1682011028005v1.png

    pastedimage1682011044187v2.png

    pastedimage1682011152643v3.png

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Look at your current query string and review whether it looks like you expect. Share it with us if needed.

    Also note that your SQL code returns orders from all companies (and partitions), while F&O filters that.

  • KeithM Profile Picture
    535 on at

    In SQL is pulls up just fine on a particular salesid anbd is the proper company  I don't have a query string. This is databound straight to the grid.

    pastedimage1682013183162v1.png

    pastedimage1682013201903v2.png

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Aha, so you don't know how to get a query string and review you query.

    You can see it directly in the GUI, in the debugger or write code extracting the value (and putting it to infolog, for example).

    In GUI, right-click the form and highlight Form information and click Form name: SalesTable. This will open Form information form, where you can see the query string. Note that it's not SQL, it's a pseudo-SQL representation used in F&O.

    The fact that you can get data from different SQL query is not very useful. It tells you nothing about the problem in the query that you're using in the form.

  • KeithM Profile Picture
    535 on at

    Awesome.... so I don't even see the join for the logisticspostaladdress at all.  I have it inner joined on the sales table. The sales table already had a relation to it within the table.

    SELECT FIRSTFAST FORUPDATE * FROM SalesLine(SalesLine) USING INDEX TransIdIdx
    WHERE ((SalesType = 4) OR (SalesType = 3) OR (SalesType = 2)) AND ((SalesStatus = 1))
    JOIN FORUPDATE * FROM InventDim(InventDim) ON SalesLine.InventDimId = InventDim.inventDimId
    NOTEXISTS JOIN FORUPDATE * FROM SalesDeliverySchedule(SalesDeliverySchedule) WHERE SalesLine.InventTransId = SalesDeliverySchedule.OrderLine
    JOIN FORUPDATE * FROM EcoResProduct(EcoResProduct) ON SalesLine.ItemId = EcoResProduct.DisplayProductNumber
    JOIN FORUPDATE * FROM EcoResProductTranslation(EcoResProductTranslation) ON EcoResProduct.RecId = EcoResProductTranslation.Product
    JOIN FORUPDATE * FROM InventTable(InventTable) ON SalesLine.ItemId = InventTable.ItemId
    OUTER JOIN FORUPDATE Name FROM EcoResCategory(Ref_EcoResCategory_SalesCategory) ON SalesLine.SalesCategory = EcoResCategory.RecId

    pastedimage1682619893225v1.png

    pastedimage1682619971683v2.png

  • KeithM Profile Picture
    535 on at

    What would cause the datasource to not show in the query statement?

    pastedimage1682698331439v1.png

    pastedimage1682698382200v2.png

    pastedimage1682698402686v3.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans