web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,563 Moderator on at
    RE: How to create a query for selection of either inventtransferline table or salesline table using workorder order table

    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
    RE: How to create a query for selection of either inventtransferline table or salesline table using workorder order table

    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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,047

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 592 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans