Skip to main content
Solved

Expose project's vendor via REST API


  • Freshman I
  • 2 replies

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.

 

Best answer by Dioris Aguilar

@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

 

View original
Did this topic help you find an answer to your question?

4 replies

Dioris Aguilar
Jr Varsity I
Forum|alt.badge.img+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?


  • Author
  • Freshman I
  • 2 replies
  • June 20, 2022

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

 


Dioris Aguilar
Jr Varsity I
Forum|alt.badge.img+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

 


  • Author
  • Freshman I
  • 2 replies
  • June 21, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings