Skip to main content
Solved

Purchase Order RO was not found


Forum|alt.badge.img+2
  • Varsity I
  • 283 replies

Hi,

My PUT request : 

{

  "VendorRef": {

    "value": "by12345"

  },

  "Description": {

    "value": "docAlpha BatchID \"1\""

  },

  "Vendor": {

    "value": "060038345988"

  },

  "Date": {

    "value": "02/22/2022"

  },

  "PostPeriod": {

    "value": "04-2022"

  },

 

  "Details": [

    {

      "InventoryID": {

        "value": "suppply"

      },

      "Project": {

        "value": "X"

      },

      "TransactionDescription": {

        "value": "Lysol Disinfectant Sprays"

      },

      "Branch": {

        "value": "branch"

      },

      "POOrderNbr": {

        "value": "06007404"

      },

    

 "POOrderType": {

        "value": "Normal"

      },

      

      "Qty": {

        "value": 1.0

      },

      "UnitCost": {

        "value": 16

      },

      "Account": {

        "value": "6234"

      },

    

      "rowNumber": {

        "value": "1"

      }

    }

  ]

}

return the following error 

however the PO is present in system 

According to PO History tab this PO is not used for another bill.

Suggest, please, what can cause the error ?

Best answer by jinin

Hi @Ivan 
Po details will be added based on the action “Add PO” or  “Add POLine”. For this, we need to create the Bill without line details. then make another call to add the Purchase order details.
 

Add the Action on the web service endpoint and try once. 
 

endpoint : /entity/Default/20.200.001/Bill/AddPOOrderLine
method: POST

{

    "entity": {

        "ReferenceNbr": {

            "value": "002947"

        },

        "Type": {

            "value": "Bill"

        }

    },

    "parameters": {

        "OrderNbr": {

            "value": "PO001584"

        }

    }

}

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

13 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • March 9, 2022

Hi @Ivan  Check with the below REST API request and verified from my end and it is working fine.

 

Hope this helps!!

{
    "Type": {
        "value": "Normal"
    },
    "OrderNbr": {
        "value": "06007404"
    },
    "VendorRef": {
        "value": "by12345"
    },
    "Description": {
        "value": "docAlpha BatchID \"1\""
    },
    "VendorID": {
        "value": "AASERVICES"
    },
    "Date": {
        "value": "03/09/2022"
    },
    "PostPeriod": {
        "value": "04-2022"
    },
    "Details": [
        {
            "InventoryID": {
                "value": "AAMACHINE2"
            },

            "LineDescription": {
                "value": "Lysol Disinfectant Sprays"
            },
            "Branch": {
                "value": "PRODWHOLE"
            },
            "OrderQty": {
                "value": "1.0"
            },
            "UnitCost": {
                "value": "16"
            }
        }
    ]
}

 


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 9, 2022
Naveen B wrote:

Hi @Ivan  Check with the below REST API request and verified from my end and it is working fine.

 

Hope this helps!!

{
    "Type": {
        "value": "Normal"
    },
    "OrderNbr": {
        "value": "06007404"
    },
    "VendorRef": {
        "value": "by12345"
    },
    "Description": {
        "value": "docAlpha BatchID \"1\""
    },
    "VendorID": {
        "value": "AASERVICES"
    },
    "Date": {
        "value": "03/09/2022"
    },
    "PostPeriod": {
        "value": "04-2022"
    },
    "Details": [
        {
            "InventoryID": {
                "value": "AAMACHINE2"
            },

            "LineDescription": {
                "value": "Lysol Disinfectant Sprays"
            },
            "Branch": {
                "value": "PRODWHOLE"
            },
            "OrderQty": {
                "value": "1.0"
            },
            "UnitCost": {
                "value": "16"
            }
        }
    ]
}

 

Hi, @Naveen B 

It did not help, now it return such erro r : “Cannot generate the next number for the  sequence.",”

I always wrote OrderNbr, POType and line in Details scope according to endpoint configuration 

but you move it to header part, is it correct ?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 706 replies
  • March 9, 2022

Hi @Ivan 

I found some issues on the field you added on the endpoint. I’ve corrected and checked. it working fine.

Please check you are using Auto numbering for OrderNbr field. If yes, no need to assign value for that field. else you can provide the value and check

 

{

    "Type": {

        "value": "Normal"

    },

    "VendorID": {

        "value": "ELEEASTCOM"

    },

    "Location": {

        "value": "MAIN"

    },

    "Date": {

        "value": "02/22/2022"

    },

    "PostPeriod": {

        "value": "04-2022"

    },

    "VendorRef": {

        "value": "by12345"

    },

    "Description": {

        "value": "docAlpha BatchID \"1\""

    },

    "Details": [

        {

            "InventoryID": {

                "value": "AACOMPUT01"

            },

            "TransactionDescription": {

                "value": "Lysol Disinfectant Sprays"

            },

            "OrderQty": {

                "value": 1.0

            },

            "UnitCost": {

                "value": 16

            }

        }

    ]

}


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 9, 2022
jinin wrote:

Hi @Ivan 

I found some issues on the field you added on the endpoint. I’ve corrected and checked. it working fine.

Please check you are using Auto numbering for OrderNbr field. If yes, no need to assign value for that field. else you can provide the value and check

 

{

    "Type": {

        "value": "Normal"

    },

    "VendorID": {

        "value": "ELEEASTCOM"

    },

    "Location": {

        "value": "MAIN"

    },

    "Date": {

        "value": "02/22/2022"

    },

    "PostPeriod": {

        "value": "04-2022"

    },

    "VendorRef": {

        "value": "by12345"

    },

    "Description": {

        "value": "docAlpha BatchID \"1\""

    },

    "Details": [

        {

            "InventoryID": {

                "value": "AACOMPUT01"

            },

            "TransactionDescription": {

                "value": "Lysol Disinfectant Sprays"

            },

            "OrderQty": {

                "value": 1.0

            },

            "UnitCost": {

                "value": 16

            }

        }

    ]

}

Hi @jinin 

I must send PoOrder Nbr to the system . it is obligatory, previously it worked at 2020R2 version, but at 2021R1 I receive the errors 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 706 replies
  • March 9, 2022
Ivan wrote:
jinin wrote:

Hi @Ivan 

I found some issues on the field you added on the endpoint. I’ve corrected and checked. it working fine.

Please check you are using Auto numbering for OrderNbr field. If yes, no need to assign value for that field. else you can provide the value and check

 

{

    "Type": {

        "value": "Normal"

    },

    "VendorID": {

        "value": "ELEEASTCOM"

    },

    "Location": {

        "value": "MAIN"

    },

    "Date": {

        "value": "02/22/2022"

    },

    "PostPeriod": {

        "value": "04-2022"

    },

    "VendorRef": {

        "value": "by12345"

    },

    "Description": {

        "value": "docAlpha BatchID \"1\""

    },

    "Details": [

        {

            "InventoryID": {

                "value": "AACOMPUT01"

            },

            "TransactionDescription": {

                "value": "Lysol Disinfectant Sprays"

            },

            "OrderQty": {

                "value": 1.0

            },

            "UnitCost": {

                "value": 16

            }

        }

    ]

}

Hi @jinin 

I must send PoOrder Nbr to the system . it is obligatory, previously it worked at 2020R2 version, but at 2021R1 I receive the errors 

@Ivan  I checked for the Purchase order. As per your above screenshot, i understood that you are trying for bills. Will check and update you.


deebhane
Semi-Pro I
Forum|alt.badge.img+1
  • Semi-Pro I
  • 62 replies
  • March 9, 2022

hi @Ivan ,

From your message we understand your trying to update the PO, can we know wat fields your trying to update ?


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 9, 2022
deebhane wrote:

hi @Ivan ,

From your message we understand your trying to update the PO, can we know wat fields your trying to update ?

Hi @deebhane 

No, I am trying to create new Bill item via Put request

URL : https://ssandbox-21r2.acumatica.com/entity/ARTSEndpoint/18.200.001/Bill


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 706 replies
  • March 9, 2022

Hi @Ivan 

Try with this sample request. 

{

    "DueDate": {

        "value": "02/17/2019"

    },

    "LocationID": {

        "value": "MAIN"

    },

    "VendorRef": {

        "value": "I4GHK"

    },

    "Vendor": {

        "value": "AACUSTOMER"

    },

    "Amount": {

        "value": "12.00"

    },

    "Date": {

        "value": "02/17/2019"

    },

    "PostPeriod": {

        "value": "01-2019"

    },

    "Balance": {

        "value": "12.00"

    },

    "VendorTaxZone": {

        "value": "ALAVARA"

    },

    "Details": [

        {

            "InventoryID": {

                "value": "AACOMPUT01"

            },

            "TransactionDescription": {

                "value": "Lysol Disinfectant Sprays"

            },

            "OrderQty": {

                "value": 1.0

            },

            "UnitCost": {

                "value": 16

            }

        }

    ]

}


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 9, 2022
jinin wrote:

Hi @Ivan 

Try with this sample request. 

{

    "DueDate": {

        "value": "02/17/2019"

    },

    "LocationID": {

        "value": "MAIN"

    },

    "VendorRef": {

        "value": "I4GHK"

    },

    "Vendor": {

        "value": "AACUSTOMER"

    },

    "Amount": {

        "value": "12.00"

    },

    "Date": {

        "value": "02/17/2019"

    },

    "PostPeriod": {

        "value": "01-2019"

    },

    "Balance": {

        "value": "12.00"

    },

    "VendorTaxZone": {

        "value": "ALAVARA"

    },

    "Details": [

        {

            "InventoryID": {

                "value": "AACOMPUT01"

            },

            "TransactionDescription": {

                "value": "Lysol Disinfectant Sprays"

            },

            "OrderQty": {

                "value": 1.0

            },

            "UnitCost": {

                "value": 16

            }

        }

    ]

}

@jinin I should try the request without PoOrderNbr field at first ?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 706 replies
  • Answer
  • March 9, 2022

Hi @Ivan 
Po details will be added based on the action “Add PO” or  “Add POLine”. For this, we need to create the Bill without line details. then make another call to add the Purchase order details.
 

Add the Action on the web service endpoint and try once. 
 

endpoint : /entity/Default/20.200.001/Bill/AddPOOrderLine
method: POST

{

    "entity": {

        "ReferenceNbr": {

            "value": "002947"

        },

        "Type": {

            "value": "Bill"

        }

    },

    "parameters": {

        "OrderNbr": {

            "value": "PO001584"

        }

    }

}


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 9, 2022
jinin wrote:

Hi @Ivan 
Po details will be added based on the action “Add PO” or  “Add POLine”. For this, we need to create the Bill without line details. then make another call to add the Purchase order details.
 

Add the Action on the web service endpoint and try once. 
 

endpoint : /entity/Default/20.200.001/Bill/AddPOOrderLine
method: POST

{

    "entity": {

        "ReferenceNbr": {

            "value": "002947"

        },

        "Type": {

            "value": "Bill"

        }

    },

    "parameters": {

        "OrderNbr": {

            "value": "PO001584"

        }

    }

}

I will search for another solution due it my application works with other Acumatica environments

application generates json request and creates bill item, but with this acumatica I faced with this problem, I need to understand what the cause

For example such request works with another acumatica 

{

  "LocationID": {

    "value": "MAIN"

  },

  "VendorRef": {

    "value": "byIvan"

  },

  "DueDate": {

    "value": "10/13/2021 12:00:00 AM"

  },

  "Vendor": {

    "value": "BADG0t001"

  },

   "Date": {

    "value": "9/29/2021 12:00:00 AM"

  },

  "Description": {

    "value": "P29/09/2021"

  },

  "TaxAmount": {

    "value": "0.00"

  },

  "PostPeriod": {

    "value": "06-2021"

  },

  "Type": {

    "value": "Bill"

  },

  "Details": [

    {

      "InventoryID": {

        "value": "UNIFORM000"

      },

      "TransactionDescription": {

        "value": "123"

      },

      "Qty": {

        "value": 1.0

      },

      "TaxCategory": {

        "value": "ZEROS"

      },

      "Branch": {

        "value": "K00000"

      },

      "POLine": {

        "value": "1"

      },

      "POOrderNbr": {

        "value": "PO018842"

      },

      "POOrderType": {

        "value": "Normal"

      },

      "rowNumber": {

        "value": "1"

      }

    }

  ],

  "Amount": {

    "value": "23,763.00"

  }

}


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 10, 2022

Hi,

Yesterday @jinin  provided a resolution by adding actions

I need to identify what is the cause of this error in this Acumatica 

I tried more requests, but the error remains the same for all PO

Purchase Order RO 06007408 was not found

Such requests perfectly work with other Acumatica systems, what can cause such problem ? Maybe some permissions or logic that was additionally added ?


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 10, 2022

I need to add some info for my previous comment 

if I do not add PO fields the request work even in this Acumatica

{

  "VendorRef": {

    "value": "by"

  },

  "Description": {    "value": " Batc"  },  "Vendor": {

    "value": "0600000821"

  },

  "Date": {    "value": "1/31/2022"  }, 

   "DueDate": {    "value": "2/15/2022"  },

  "PostPeriod": {    "value": "04-2022"  },

 

  "Details": [

    {

        "ReceiptQty": {"value": 1},

          "InventoryID": {

        "value": "MOG700"

      },

      "Project": {        "value": "X"      },

     

      "Branch": {        "value": "FOHIL"      }

      

          

 

    }

  ]

}

 

But when I add those 3 fields :

"POOrderNbr": {        "value": "06007394"      },

        "POOrderType": {        "value": "Normal"      },

      "POLineNbr": {"value": 1}

I receive the error that mentioned in previous comment 


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