in the Adobe campaign Classic v7. I am executing a query from the webapp when the user subscribe to get some reward code and inject into email . I am having permission issues when webapp trying to execute the query even though the webapp user have Administration rights( some time it works though) .. The webapp access control is set up as Anonymous access. The funny thing is that there is another query that gets execute fine. The table that is getting queried is under a custom schema .
below is the query that get executed
var query = xtk.queryDef.create( <queryDef schema="vb:promoCodes" operation="select" lineCount="1">
<condition expr="@codeStartDate <= GetDate()"/>
<condition expr="@codeEndDate >= GetDate()"/>
var promoCodes = query.ExecuteQuery();
Error | Function getpromoCode() failed | PGS-220000 PostgreSQL error: ERROR: permission denied for table vbpromocodes .
SOP-330011 Error while executing the method 'ExecuteQuery' of service 'xtk:queryDef'
The error is coming from postgres there.
Check that Campaign's db user has read access to the vbpromocodes table.