Skip to Content
1

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

Oct 23, 2017 at 08:03 AM

280

avatar image
Former Member

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": []
}
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

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

hi Christina, i have the same problem too

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Nov 17, 2017 at 06:51 AM
0

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

We would consider to support it in the future patches.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Nov 17, 2017 at 07:06 AM
0

The future patch is 9.2 PL10

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

hi Former Member,

i have installed "9.3 (9.30.110) PL: 01" but it still not working

0
Former Member
Former Member

Hi Salome,

The Business One version 9.3H PL02 should be the version including the same fixing in 9.2PL10. BTW 9.2PL10 is already released on 12/4/2017.

1
Former Member
Former Member

Former Member thank you

0
Jacob Tan
Feb 11 at 04:43 PM
0

Hi Christina,

Please try the following:

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