Need help with a permission error, please. Trying to do a search from an extension on a custom item field when user is not logged in. What role does SCA execute from? Is this possible?
p
PabloZ
02/12/2020, 3:32 PM
Do you know item ids beforehand? If so, instead of doing a search, use the commerce api to get item values.
If you don't, you'll need to elevate permissions on the service. The shopper role is not a role you can add permissions to.
The permission the elevated role needs to have is "item" -> View.
c
Chris
02/12/2020, 3:36 PM
Ok, thanks @PabloZ. Related question, one of the fields is a multi-select and I get back item names, not ids. Is there a way to do an item lookup using the name field with the commerce api?
p
PabloZ
02/12/2020, 4:35 PM
No, only ids.
c
Chris
02/12/2020, 4:35 PM
This is a bummer. Thanks for your help.
Chris
02/12/2020, 11:09 PM
So I got tired of trying to get around the commerce api limitations and just created a suitelet to get the info I need. I wish the commerce api was less clunky.