Skip to main content
Solved

Create PO with API

  • April 22, 2024
  • 8 replies
  • 240 views

Forum|alt.badge.img+1

Hello all, What ID do I put in the Owner Field of a PO. When I use the Employee id it does not work.

 

"error": "'Owner' cannot be empty."

 

 

 "Owner": {

        "value": "4264",

        "error": "Owner 'E00003    ' cannot be found in the system."

    },

Best answer by ruchikasharma23

@keithschm 
I tested by creating a PO and it was created with correct Owner value, screenshot below:


This field is expecting the “ContactID” 
 

UI:

 

8 replies

Forum|alt.badge.img+3

@keithschm 
1. Are you able to create PO with this employee from the UI? If not, here’s what we need to follow.
 

  1. However, if it works from the UI and not only from the API, then I would create a PO from UI and perform a GET request for it and observe what is returned in Owner field.
    For e.g. GET : {sitename}/Default/22.200.001/PurchaseOrder/Normal/POXXXXX

Forum|alt.badge.img+1
  • Author
  • Varsity I
  • April 22, 2024

Thank you that is all setup. I think there is an issue with the test instance. I get the same error when manually entering, but when I press save it saves the owner.  Yet it know who  E00003 is, 

 


Forum|alt.badge.img+3

@keithschm 
Did you get a chance to check what is returned for the PO which you created from UI with this owner.
 

 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • April 22, 2024

yes, it is the number I am passing in the put:

 

 "Owner": {

            "value": "4264"

        },

 

 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • April 22, 2024

Thank you for you help. It is a strange Error


Forum|alt.badge.img+3
  • Acumatica Moderator
  • Answer
  • April 23, 2024

@keithschm 
I tested by creating a PO and it was created with correct Owner value, screenshot below:


This field is expecting the “ContactID” 
 

UI:

 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • April 26, 2024

Sorry for the late reply. I see it is using the contact id. I am able to create now.  Thank you very much.

 

Now to figure out how to set the approver….


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • April 26, 2024

There is a approver Tab on the PO. I do not see it in the API, and if I try to extend the API I am not sure which object to add as I do not see it. Is this possible? I also do not see the approver when I get the PO through the API either. Our PO’s are approved in a 3rd party system so they have a owner and an approver already.