Skip to Content
avatar image
Former Member

Service Layer: How to remove all addresses of a business partner?

I'm currently using service layer to delete addresses of a business partner.

Now I want to delete all existing addresses.

First I tried to use PUT as update method. Is this method no longer available since version 9.2 PL08 or 09? When I try to use PUT method, I always get an error message: internal server error.

Now I am using the PATCH method for my update. It works well when I delete or add one address.

But I can't remove the last address of my business partner.

I send the following request to delete all addresses, but this will not work (Response is 204 No Content). It doesn't matter if I set B1S-ReplaceCollectionsOnPatch=true or not.

How can I delete all entries of business partner addresses?

PATCH /b1s/v1/BusinessPartners('XYZ')

B1S-ReplaceCollectionsOnPatch=true
{
  "BPAddresses": []
}
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Nov 14, 2017 at 07:38 AM

    hi Christina, i have the same problem too

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 17, 2017 at 06:51 AM

    Currently no way to delete all entries of business partner addresses.

    We would consider to support it in the future patches.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 17, 2017 at 07:06 AM

    The future patch is 9.2 PL10

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 11 at 04:43 PM

    Hi Christina,

    Please try the following:

    PATCH /b1s/v1/BusinessPartners('XYZ')
    B1S-ReplaceCollectionsOnPatch=true
    {"BPAddresses": [{"AddressName": ""}]}
    
    Add comment
    10|10000 characters needed characters exceeded