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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to relate two transaction tables without replication of data in x++

(0) ShareShare
ReportReport
Posted on by

Hi All,

we are trying to get the data from 2 tables, LedgerTrans and VendTrans , it is having the data like below:

LedgerTrans
Voucher Account Number
V001 1212
V001 1213
V001 1214
V001 1215
VendTrans
Voucher Account Number
V001 Vend01
V001 Vend02
V001 Vend03
V001 Vend04

We need the result as below:

Voucher Account Number Vend Account
V001 1212 Vend01
V001 1213 Vend02
V001 1214 Vend03
V001 1215 Vend04

tried writing x++ statement but the results is coming in duplicate records.

How we can write the x++ select statement to get the result.

Please advise.

Regards,

Akbar

I have the same question (0)
  • Community Member Profile Picture
    on at

    please refer the below example

    docs.microsoft.com/.../select-statement-examples

  • Akbarpasha Profile Picture
    on at

    Thank you Muthu for the quick response,

    We are having both transaction tables,will order by works, we don't want the duplicate records in the result.

    Regards,

    Akbar

  • Community Member Profile Picture
    on at

    you can use Group by instead of order by to avoid duplicate records in your selection

  • Community Member Profile Picture
    on at

    Hope this solution works for you, if so please mark this as resolved.

    Thank you

  • Suggested answer
    Deepak Agarwal Profile Picture
    8,681 on at

    For such requirements, best to create a view first and understand how different linked to each other. You can simply create a view object in your project and add tables into it, add the right relation and see by browsing if getting expteced data.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 627

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 615 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 301

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans