Question Status

Suggested Answer
JRaymar asked a question on 11 Jul 2013 12:03 PM

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.

Reply
Suggested Answer
Brandon Ahmad responded on 14 Jul 2013 10:20 AM

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.  

Independent, Freelance Consultant and Dynamics Development Instructor

http://www.instructorbrandon.com

http://www.youtube.com/user/BrandonAhmad

Reply
Suggested Answer
Brandon Ahmad responded on 14 Jul 2013 10:20 AM

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.  

Independent, Freelance Consultant and Dynamics Development Instructor

http://www.instructorbrandon.com

http://www.youtube.com/user/BrandonAhmad

Reply
JRaymar responded on 19 Jul 2013 11:22 AM

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.

Reply