Page 1 of 1

Update the List of a Custom Field Setup not overwrite the old List

Posted: Tue Oct 22, 2024 3:31 am
by VincentHoang
Hi Team,

I’m unsure whether this is a bug or expected behavior. I'm trying to update the employee custom field list template using the API endpoint /api/v1.0/companies/{companyID}/setup/customFields/employees/{customFieldID}.

In the payload, I’ve defined the list as follows:

Code: Select all

"ListItems": [
  "string"
]
I assumed this would overwrite the existing list with the new values. However, it seems to be appending the new list items to the old ones. Is this the intended functionality?

If so, is there a way to overwrite the list instead of appending to it?

Best regards,
Vincent

Re: Update the List of a Custom Field Setup not overwrite the old List

Posted: Fri Oct 25, 2024 3:50 am
by SimproAPITeam
Hi Vincent,
I've tried to reproduce the behavior you are mentioning. When I use patch to update the list it replaces the existing list in the setup endpoint.

https://developer.simprogroup.com/apido ... 6d60ed50bc

If you are still experiencing that it is adding elements to the list instead of replacing using the endpoint above please submit a case to our Simpro support with relevant information such as your build name, request body and other info on what fields/endpoint you are using and they will investigate further.

https://helpdesk.simprogroup.com/

Regards