Xtina
10/08/2021, 7:09 PMPermission Violation: You need the 'Set Up Company' permission to access this page. Please contact your account administrator.
I even tried to create a state saved search in the ui and do a search.load with the run unrestricted checked/public check and I am still running into the above issue.
function getStates(country) {
console.log('-Function getState-');
var arrResults = [];
var stStateId = '',
stStateFullName = '',
stStateShortName = '',
stCountry = '';
var selectedCountry = search.createFilter({
name: 'country',
operator: search.Operator.ANYOF,
values: [country]
});
var searchObj = search.load({
id: 'customsearch_ss_lookup_states'
});
searchObj.filters.push(selectedCountry);
searchObj.run().each(function(result) {
var ssColumns = result.columns;
stStateId = result.getValue(ssColumns[0]);
stStateFullName = result.getValue(ssColumns[1]);
stStateShortName = result.getValue(ssColumns[2]);
stCountry = result.getValue(ssColumns[3]);
arrResults.push(new stateItem(stStateId, stStateFullName, stStateShortName, stCountry));
return true;
});
return arrResults;
}
I obviously can't give the set up company permission to the customer role, it seems weird that it is even asking for that permission? I'm not changing/adding states, I'm merely trying to look them up in the client script.ericbirdsall
10/08/2021, 7:12 PMXtina
10/08/2021, 7:16 PM