Skip to main content

Notifications

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.

  • Ganesh Potnuru Profile Picture
    Ganesh Potnuru 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

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans