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, ...
Unanswered

How to create a query for selection of either inventtransferline table or salesline table using workorder order table

(0) ShareShare
ReportReport
Posted on by 170

Hi there,

I have extension field of myWorkorder Id in Inventtransfertable which is same as workorder id from workOrderTable

& salesline.InventRefID which is same as work order id from workOrderTable

Here the requirement is i need to fetch workorder detaisl if workorder id from work order table exists in either sales line or inventtarnsferline,for that i have written a query which i have attached below but i'm getting records from inventtransferline if the workorderid matches with workordertable but i'm getting salesline records if workorderid matches with workordertable.

pastedimage1684483093388v1.png

In the above i used inner join for inventtransferline and outerjoin for salesline and I'm getting only matching records from inventtransferline. If i use inner join for both datasources I'm getting any values form either inventtransferline or sales line.

I have the same question (0)
  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, You want to fetch record if related record exists in SalesLine or InventTransferLine table. Instead of AOT query, you create use x++ query.

  • Ganesh Potnuru Profile Picture
    170 on at

    Hi Mohit,

    Thanks for the input.

    Bt the requirement is to add these fields in Records to include tabpage in report dialog form to setup range for wokorder ID field from workorderTable,TransferId field from inventtransferline and sales id field from salesline table.

    Is it possible to acheive setting up ranges in report dailog from using x++ query

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans