Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Create PO smartlist

Posted on by 55

I need some assistance creating a reusable smart list that crosses Financial and Purchasing areas. Our Marketing Team would like to know what Open Purchase Orders they have along with the Invoices already invoiced for the current Month and even the next month. 

So, something like – What does the total PO’s created for X to Y accounts have to Spend in September and what has already been spent in those accounts (Finance), and what’s left to spend (POP total – Finance Total = what’s available to spend)

I've tried several of Victoria Yudin's SQL views but can't seem to get the info needed.

Categories:
  • Suggested answer
    Isaac Olson Profile Picture
    Isaac Olson on at
    RE: Create PO smartlist

    Hi Darin, 

    Any time that I am creating a SmartList that requires more than 1 join I feel that SQL Views the best and most flexible way, and then you can bring that SQL View into SmartList Designer or Builder in your case.  I wouldn't be able to put the amount of time required into creating these custom scripts for you on a forum post, and at this point is not super clear exactly what the front-end user is looking for as there are a ton of factors that could play into this.  In general, where would be the tables involved that you can use as a starting point. 

    Open POs would just be any PO in the POP10100 with a status that is not 5 or 6 (closed or cancelled) so that can really just be a select statement on its own using the POP10100 or POP10110. 

    POSTATUS

    1=new

    2=released (printed)

    3=change order

    4=received

    5=closed

    6=canceled

    As for Invoices, if you are always doing shipment/invoices or are always doing shipments and then matching invoices it might be more difficult. 

    select * from POP10110 where PONUMBER = 'PO2080' --PO Lines
    select * from POP10500 where PONUMBER = 'PO2080' --PO Receipt Lines (tracks what has been shipped and invoiced so far and links the receipt back to specific PO Lines)
    select * from POP30310 where PONUMBER = 'PO2080' --Posted Receipt Lines (tracks what has been shipped and invoiced so far)

    If you always posted enter/match invoices separate from shipments then you could use the POP10600 table, but that is not populated if you use shipment/invoices.

    Another factor that will come into play is whether you consider Invoices that are created but not posted yet, and you would have to join the POP10310 for work records besides the POP30310 table for posted receipts too if you are going to break it down further by date with unposted items. 

    Ultimately, I believe what they are asking for would be possible but it's not going to just be a matter of joining a couple tables.  You will have to add logic to the queries and really narrow down the rules of what they want to query.  

    I put this together quick to get you started, but again we can't provide custom scripting and fine tuning through a forums post as there is a lot of time and effort that would be involved in this. 

    select a.PONUMBER, a.EXTDCOST as 'POLINECOST',b.EXTDCOST as 'INVOICED',b.POPRCTNM, c.receiptdate from POP10110 a left join POP10500 d on a.PONUMBER = d.PONUMBER and a.ORD = d.POLNENUM left join POP30310 b on d.POPRCTNM = b.POPRCTNM and d.RCPTLNNM = b.RCPTLNNM left join POP30300 c on c.POPRCTNM = b.POPRCTNM order by a.PONUMBER

    This would list out PO Lines, their line's original cost, the cost that has been invoiced on them so far, and would return null for PO Lines that have not been invoiced at all.  

    I hope this helps!

    Isaac Olson

    Microsoft Support

  • Darin722 Profile Picture
    Darin722 55 on at
    RE: Create PO smartlist

    We are using Smarlist builder.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans