Skip to main content
Solved

REST API: how do I DELETE a Sales Price row (AR202000 screen) using InventoryID, PriceType, and PriceCode?


Forum|alt.badge.img+2

I can delete a row fine if I use RecordId.  However, in the case I don’t have the exact RecordId, how do I delete a row using these values:

{

    "SalesPriceDetails": [

        {

            "InventoryID": { "value": "00000-00002" },

            "PriceType": { "value": "Customer Price Class" },

            "PriceCode": { "value": "VIP" },

            "delete": true

        }

    ]

}

 

When I try this, it deletes the first InventoryID/PriceType it finds which will delete the wrong row if I have a row with a PriceCode like “WHOLESALE”.

Best answer by dcomerford

You could use 2 rest calls the first is to get the RecordId with the values you have then use the result to delete it.

I think you need the recordid to delete.

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

3 replies

dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • 644 replies
  • Answer
  • July 5, 2024

You could use 2 rest calls the first is to get the RecordId with the values you have then use the result to delete it.

I think you need the recordid to delete.


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • 66 replies
  • July 5, 2024
dcomerford wrote:

You could use 2 rest calls the first is to get the RecordId with the values you have then use the result to delete it.

I think you need the recordid to delete.

Is there a way to get the RecordID without having parse through the entire SalesPricesInquiry object including all the child SalesPriceDetails objects?  Here’s what I’m using currently:

https://sandbox.com/AcumaticaERP/entity/Default/20.200.001/SalesPricesInquiry?$expand=SalesPriceDetails

body:

{

    "InventoryID": {"value": "00000-00002"},

    "PriceType": {"value": "Customer Price Class"},

    "PriceCode": { "value": "VIP" }

}


dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • 644 replies
  • July 7, 2024

@bpgraves I dont believe so.


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