Skip to main content
Solved

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

  • 5 July 2024
  • 3 replies
  • 35 views

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": l

        {

            "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”.

3 replies

Userlevel 7
Badge +14

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.

Userlevel 3
Badge +1

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" }

}

Userlevel 7
Badge +14

@bpgraves I dont believe so.

Reply