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

Notifications

Announcements

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

News and Announcements

Season of Giving Solutions is Here!

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
Abhilash Warrier Profile Picture

Abhilash Warrier 836 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 346 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans