
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2017 03:50 AM
hi folks,
any idea how can we customize the look and feel of the sn-record-picker ? I'm using it in service portal. I customized the look to minimum extent but if i do page back and forth using browser buttons I get the default look of the sn-record-picker.
I have a design provided by client and I need to fulfill it.
Any leads would really be appreciated !!
Much thanks in advance !!
Thanks and best regards,
Sushma
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 12:44 AM
I got it to work.
It was naming standards. If the Angular provider name is newRecordPicker then the directive in the html is new-record-picker.
Also this part of the downloaded js should be removed:
angular.module('sn.common.controls').directive('snRecordPicker',
as well as the ending ) at the end of the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 12:44 AM
I got it to work.
It was naming standards. If the Angular provider name is newRecordPicker then the directive in the html is new-record-picker.
Also this part of the downloaded js should be removed:
angular.module('sn.common.controls').directive('snRecordPicker',
as well as the ending ) at the end of the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 12:06 PM
Glad you were able to work it out. I've been real busy but today I was going to post how to add to the portal as a dependency as well as create as a directive. But I think you don't need it now. Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 09:13 PM
Thanks Chris, I got basics to work but not looking so good so I would like to ask if you would share the changes you made to give the dropdown the look in the screenshot you posted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2018 09:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2017 05:38 AM
Following Chris suggestion of creating a new Angular Provider I managed to get the dropdown list to look decent.
I found two issues. First was that the div cell that contained each line of data did not fill the drop downlist full width.
Next problem was that the function that gets the data for each line only will return a cell if the field is not null meaning that for some lines you would get 1 or 2 cells even if it should contain 3 fields.
Here is how my list looks now.
And here are the two parts of the code I modified. My additions in red.
if (displayFields.length > 1) {
var markup = $sanitize(displayFields[0]);
var width = 100 / (displayFields.length - 1);
markup += "<div style='width: 100%;display: table;table-layout: fixed;'>";
for (var i = 1; i < displayFields.length; i++)
markup += "<div style='width: " + width + "%;' class='select2-additional-display-field'>" + $sanitize(cleanLabel(displayFields[i])) + "</div>";
markup += "</div>";
return markup;
var columns = scope.displayFields.split(",");
for (var i = 0; i < columns.length; i++) {
var column = columns[i];
if (selectedItem[column])
displayFields.push(selectedItem[column]);
else
displayFields.push(" ");
}