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 :
Microsoft Dynamics AX (Archived)

Searching Purchase Order with X++

(0) ShareShare
ReportReport
Posted on by 155

Hey all,

I'm interested in using X++ to do a purchase order look-up on a purchase order that already exists. From that look-up, I want to obtain the lines; basically, the items that are associated with that purchase order in a string or array format. However, my experience with X++ is very minimal and I have no idea how to do this. If anyone has done something similar or would know how to go about this, I would greatly appreciate any and all help.

*This post is locked for comments

I have the same question (0)
  • JRaymar Profile Picture
    155 on at
    RE: Searching Purchase Order with X++

    Thank you very much for your input, I don't have much access to the MorphX development environment so I'll try through SharePoint and see what results I can get.

  • Suggested answer
    Brandon Ahmad Profile Picture
    2,465 User Group Leader on at
    RE: Searching Purchase Order with X++

    something to the effect of:

    PurchTable purchTable

    select * from purchTable

    where purchTable.PurchID == <somerealpurchaseid>

    (followed by whatever you want to do with it (info, ect)

    and if you needed to do a join, you can go from there.  The hardest thing is figuring out the schema and Microsoft's website has made that a lot easier.  http://www.microsoft.com/dynamics/ax/erd/ax2012r2/Fky-ProcureSrc-ParentChilds-15.htm#p-purchtable

    some join examples to go further http://msdn.microsoft.com/EN-US/library/aa848113.aspx

     

     

    --------------------------------------------------------------------------------------------------

    If you don't like X++, simply use SharePoint search.  Graphically, drag and drop your way to a query for purchase orders.  Then, publish the query to SharePoint.  

    From there, you can use search operators till your heart is content.  

    But to get your Dynamics AX into search appropriately, here are the steps:

    instructorbrandon.com/dynamics-ax-aif-tutorial-series-part-3-aif-document-services-and-a-sharepoint-infopath-forms-step-by-step-for-power-users-part-e

    Skip all of the post and go to the end:

    "High level fix it steps until next Dynamics Ax blog post, Part 3E".. Look at step 1

    I'm going to change the entire series and make it more compressed after I'm done so that part of the post probably won't be there in the future.  However, for now, you can see how to add a query to search.  

    Now, just find any one of several different query tutorial blogs on the internet to build a query.  Than, you can search for purchase orders in the sharepoint search bar using keyword query operators (if using sharepoint 2010)..  

    msdn.microsoft.com/.../ee558911(v=office.14).aspx

    That will get you what you need.  

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans