Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Relations between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans

Posted on by 80

Hi experts,

I'm new to D365.

I need your help.

Can you please suggest me how to make a relationship between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans.

I wanted to get the packing slips for the sales lines.

Thank you.

  • Suggested answer
    Katy3992 Profile Picture
    Katy3992 322 on at
    RE: Relations between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans

    Hi,

    I have no idea if it helps you or not but here's my sql query to connect salesline + custpackingsliptrans, inventmodelgroupitem I used to exclude service items.

    select distinct SALESLINE.ITEMID,

    SALESLINE.SALESID,

    isnull(PACKINGSLIPID, '<none>'),

    isnull(CUSTPACKINGSLIPTRANS.DLVTERM, '<none>')

    from SALESLINE left outer join

    CUSTPACKINGSLIPTRANS on SALESLINE.INVENTTRANSID = CUSTPACKINGSLIPTRANS.INVENTTRANSID left outer join

    INVENTMODELGROUPITEM on SALESLINE.ITEMID = INVENTMODELGROUPITEM.ITEMID and salesline.DATAAREAID = INVENTMODELGROUPITEM.ITEMDATAAREAID

    Like that there shouldn't be any duplicates... let me know what you think about it.

    Best regards

    Katy :-)

  • Vidhushan S Profile Picture
    Vidhushan S 80 on at
    RE: Relations between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans

    Hi Katy,

    Thank you for your reply.

    In my report I need to show sales order- sales line details - packing slip id - invoice details.

  • Katy3992 Profile Picture
    Katy3992 322 on at
    RE: Relations between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans

    Hi,

    what do you need to report? Cause if you have an n:n connection you will have duplicates of course but these are related to your process so I am wondering - what exactly is the problem?

    Regards Katy

  • Vidhushan S Profile Picture
    Vidhushan S 80 on at
    RE: Relations between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans

    Hi sahin.

    Thank you for your reply.

    We can use inventtransid,

    But the problem is when we have multiple packing slips for a single salesline. Or multiple packing slips for multiple sales line. 

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: Relations between custPackingSliptrans and sales line or between custPackingSliptrans and custinvoicetrans

    You can find it via InventTransId

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans