I have a field render snippet that pushes in picklist values. It is working fine, but doesn’t work in my community.
I solved some previous community issues by cloning skuid VF pages - like for the ExportData function.
This makes me suspect that my community user may not have access to the skuid.utils.decodeHTML but I don’t see a way to grant access (or confirm that they have access.) I use that based on this thread:
https://community.skuid.com/t/how-do-i-render-custom-picklist-values
Here’s my snippet that works for internal users, including when logged into the community, but not for my community user profiles.
The users do have access to the contentTags model. Are there any other places I should check for community access? We’ve been using Skuid pages in our community for a long time, so the basics work just fine.
var field = arguments[0],
value = skuid.utils.decodeHTML(arguments[1]),
$ = skuid.$;
var contentTagsMdl = skuid.model.getModel(‘contentTags’);
var picklistEntries = field.metadata.picklistEntries;
picklistEntries.length = 0;
if (field.mode === ‘edit’) {
var tagsForPicks = ;
skuid.$.each(skuid.model.getModel(‘contentTags’).getRows(), function(i,row) {
tagsForPicks.push({
active: true
,defaultValue: false
,label : row.contentTagc
,value : row.contentTagc
});
});
var customMultiselect = skuid.ui.renderers.MULTIPICKLIST.edit({
entries : tagsForPicks,
required : false,
value : value
}).change(function(newValue) {
var selectedOptions = ‘’;
for(i = 0; i < newValue.target.selectedOptions.length; i++) {
selectedOptions += newValue.target.selectedOptions[i].value + ‘;’;
}
//Update the row in the target object
field.model.updateRow(field.row, ‘contentTagc’, selectedOptions);
});
//Append the MULTIPICKLIST to the DOM element
field.element.append(customMultiselect);
} else {
//If the mode is anything other than edit, display the field as Text
var formattedValue = ‘’;
if(value !== null) {
formattedValue = value.split(‘;’).sort().join(', ');
}
skuid.ui.fieldRenderers.TEXT.read(field, formattedValue);
}
Question
Community User access to skuid.utils.decodeHTML (?)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
