rajeshghosh avatar image
rajeshghosh asked rajeshghosh commented

How to check the order LOCK value when deleting the order??


I want to delete the order through OrderConnector but when I tried it, the order is showing "LOCK". The getState() method is showing it open but there is not method defined through which we can get the LOCK status.

Can anyone please help me out in solving this problem?

Thanks in advance, Aagrah

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Are you saying that when you get the order via order connector is shows as open but when you attempt to delete it you get an error saying it's locked? Can you provide more details?

0 Likes 0 ·

Yes Jeff, When I am debugging the application and checking the order object, the first field which is there is "LOCK", I am not sure if it is not allowing me to delete the specific order but everytime when I am executing the : orderConnector.deleteLineItems(); it is giving me "ClientException" with cause message = "BAD_REQUEST". Do you have any idea why it is happening?


0 Likes 0 ·

If you do an OrderConnector.getOrder(...).getState(), is it locked? If so, that explains the client exception. Other reasons are that the order doesn't exist or has no line items. An order is locked if it has payments. You are not allowed to make changes to an order after it has been paid (or partially paid).

0 Likes 0 ·

Thanks Jeff for the clarification. Can you please let me know how i can check if the order is in payment or partial payment? Is their any method through which i can check it?

0 Likes 0 ·

Coming full circle, can you just check if it's locked?

0 Likes 0 ·
Show more comments

0 Answers

Welcome to the
Clover Developer Community