Skip to main content

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 ?

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 @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 ?


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 @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 


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.


hi @Ivan ,

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


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


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

            }

        }

    ]

}


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 ?


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"

        }

    }

}


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"

  }

}


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 ?


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