Solved

Expose project's vendor via REST API

  • 20 June 2022
  • 4 replies
  • 138 views

Hi all,

I’d like to use the default endpoint to retrieve the relationship between the Project & Vendor. Could someone shed some light on how to $expand that please? (Tool used : Postman)

Can it be achieved by creating a customized endpoint which I have added the Vendors (screenname) but how do I expand that to link Projects?

See below image for the new endpoint.

 

icon

Best answer by Dioris Aguilar 21 June 2022, 20:06

View original

4 replies

Userlevel 5
Badge +2

@jung Endpoints are based on existing screens, so, we would need to have a screen with this relationship. Could you show the screen having the relationship between Projects & Vendors?

Hi Dioris,

Thanks for replying so quickly.

The challenge I am facing is exactly what you have pointed out. However I notice there’s CONTACTS tab where I can add the Vendor’s record as seen in the below screen. This is the only area I could find the relationship has been established, correct me if I am wrong please. Could you confirm if the relationship between Vendors & Projects are not concrete as in, it’s not built in or not by the system design please? I then checked the Project DAC via the Generic inquery to find the definition is CONTRACT. However not much luck in there.

I went through the database without any luck of finding the table named ‘project’. I then checked out the ‘contract’ table and found ContractCD is the same id as the project PR00000001. So I am still exploring.

 

 

 

Service endpoint for Project

 

Service endpount for Vendor

 

But no contract endpoint

 

Userlevel 5
Badge +2

@jung In this case, since the Contacs tab is inside the Projects screen, you could extend the default endpoint and insert a new detail object having the Contacts  object name.
 

Remember to populate the fields as well:

Then, when making the request, you can add $expand to explicitly request to bring the information from the new detail object like this:

http://<Acumatica instance URL>/entity/ExtendedEndPointName/20.200.001/Project/PR00004000?$expand=Vendors

 

Hi Dioris,

Thank you very much for the helpful tips. Your feedback reinforce my knowledge of the i310 training material. Much appreicated.

This is highly useful with the customized web service endpoint.

Have a nice day.

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