My end goal is to get the unit price for an item from a purchase agreement with X++ code. I'm having a hard time figuring out where to access this information. All I currently have available to me in my code is the Vendor information and the item, but not even what Purchase Agreement Number. I'm working with the assumption that a vendor will not have a given item in multiple PA's.
My first thought is to find the PA and then access the PA Lines to get the Unit Price for the item. If there's a better way I would love to hear it. Currently in the All Vendors List Page you can click the Procurement Tab and then the Purchase Agreements Button with a vendor selected to be taken to the Purchase Agreements List Page filtered to just that vendor. I can't figure out how to duplicate this functionality in my own code. Since I have the vendor information already my plan is to find all the PA's for that vendor, then search the PA's for the item I'm looking for and then get the Unit Price for that item from the PA Line.
I'm not sure this is the way I should be trying to do this, but it's the best idea I have for accessing this information, presently.
*This post is locked for comments