1

I am attempting to update and create new locations using the Acumatica REST Web-services Endpoint.

As you can see in the image below, the endpoint CustomerLocation entity includes the 'Active' field.

CustomerLocation Entity

I'm making a PUT request to the CustomerLocation endpoint and getting a 200 OK response, however the 'Active' field is not updating to 'false'.

Here's the payload that I passed to the request (replaced "values" with fake ones for privacy purpose):

Method: PUT

ENDPOINT: .../20.200.001/CustomerLocation

PAYLOAD:

{
    "Active": {"value": false},
    "AddressOverride":{"value":true},
    "ContactOverride":{"value":true},
    "AddressCode":{"value":"sunt_explicabo"},
    "Commercial":{"value":"ER"},
    "Customer":{"value":"Aliquip"},
    "LastModifiedDateTime":{"value":"2023-07-07T12:11:35+02:00"},
    "LocationContact":{
        "Address":{
            "AddressLine1":{"value":"Laboris nisi ut aliquip"},
            "AddressLine2":{"value":""},
            "City":{"value":"Nisi"},
            "Country":{"value":"US"},
            "PostalCode":{"value":"00000"}
        },
        "Attention":{"value":""},
        "DisplayName":{"value":"Aliquip"},
        "Email":{"value":"Laboris@fakemail.com"},
        "Fax":{"value":""},
        "FirstName":{"value":"Ullamco"},
        "LastName":{"value":"Magna"},
        "Phone1":{"value":"036-352-635"},
        "Phone1Type":{"value":"Business 1"},
        "Phone2":{"value":""},
        "Phone2Type":{"value":"Cell"},
        "Phone3":{"value":"023-022-014"},
        "Phone3Type":{"value":"Cell"}
    },
    "LocationID":{"value":"Consectetur adipiscing elit"},
    "LocationName":{"Consectetur adipiscing elit"},
    "ShippingBranch":{"value":"Duis"}
}

Here's part of the response, where we can see the "Active" field value is not the one I've passed in the request:

Response Body and code

All other values are ok.

Does anyone have a clue of what's going on?

Thank you in.

Hadegh
  • 11
  • 2

1 Answers1

0

You need to update Status field instead of Active. For some reason 20.200.01 doesn't have this field, so you need to extend your endpoint. Active field is mapped to Location.IsActive, and that field is a kind of calculated field, it's value is true when Location.Status is Active.

Zoltan Febert
  • 471
  • 5
  • 9
  • Thanks for your reply. Haven't been able to test it though, our CIO is currently unavailable and only he can extend the endpoint. – Hadegh Jul 12 '23 at 08:59