You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to check if an Item with a specific ItemCode exists in SAP B1.
I do https://[servicelayer]/b1s/v1/Items('12345')?$select=ItemCode. When ItemCode 12345 exists, I will get a successful response. But when it does not exist I get an unhandled exception. Of course I can resolve this with a try-catch, but that doesn't sound like the most smooth way to check if a specific item exists. What is your advise?
The text was updated successfully, but these errors were encountered:
Actually you probably got a 404 status code, which will throw an exception. If you like you can modify this behavior during the request, using the extension method called .AllowHttpStatus(statusCode), in your case 404 (NotFound).
Hi all,
Nice library, thanks!
I want to check if an Item with a specific ItemCode exists in SAP B1.
I do https://[servicelayer]/b1s/v1/Items('12345')?$select=ItemCode. When ItemCode 12345 exists, I will get a successful response. But when it does not exist I get an unhandled exception. Of course I can resolve this with a try-catch, but that doesn't sound like the most smooth way to check if a specific item exists. What is your advise?
The text was updated successfully, but these errors were encountered: