Solved

ODATA4 - Join PMProject with PMTasks

  • 15 February 2024
  • 4 replies
  • 40 views

Badge

How can I join the PMProject object with PMTasks? When I use the $expand paramater, I keep getting errors.

I have tried PMTask, Task and both are resulting in errors.



 

 

icon

Best answer by abhijit 16 February 2024, 14:51

View original

4 replies

Userlevel 5
Badge +1

Hi @abhijit ,

I’m not very good on the JSON side of things, but Tasks don’t reside in the PMProject table.  You will need to pull in PMTask, and join PMProject.ContractID with PMTask.ProjectID.

Good luck!

Badge

The way to do this would be to use the $expand parameter and I tried to do what you suggested, and it fails with this error.

“Could not find a property named ‘PMProject’ on type “PX.Objects.PM.PMTask”

 

Badge

I was able to resolve this using these steps.
1) Download the metadata for acumatica. This metadata is always in XML format.
2) In the metadata search for EntityType Name="PMProject" Once you’ve found this, you can start exploring the NavigationProperty under the Entity.  You can only expand a navigation property if it is of type “collection”.
3) I looked for the collection property PMTaskCollection and PMBudgetCollection. These are the properties that I added to the $expand parameter. Now my call in Postman is returning the correct data.
 


 

Userlevel 7
Badge

Thank you for sharing your solution with the community @abhijit!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved