Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2020-09-28 01:24 PM
Hello all,
I am trying to add a custom button to the top of the record page, near the "Add", "Export", and "Email" buttons. I have the button working, but I'm stuck on one minor thing. I cannot figure out how to add an icon to the button so that it isn't just text. I would like for it to blend in to keep a consistent look and feel to the page.
I put an example of how the button is made below, using everyone's favorite button - the copy button! Does anyone know how to get an icon in there instead of text? Specifically, in this example, I would like to put the "FileCopy" icon from Material Icons - Material-UI in the data-icon attribute.
<script type="text/javascript">
var copyIcon = 'copy';
$('#master_btnAdd').clone().attr({'id': 'master_customBtnCopy', 'title': 'Copy', 'onclick': 'javascript:__doPostBack("master$btnCopy","");return false;'}).insertAfter('#master_btnAdd');
$('#master_customBtnCopy').children().attr('data-icon', copyIcon);
</script>
2020-09-28 01:43 PM
Corey, I don't think we're using Material Icon yet within the record but you can use the old icon set.
<script type="text/javascript">
var copyIcon = '';
$('#master_btnAdd').clone().attr({'id': 'master_customBtnCopy', 'title': 'Copy', 'onclick': 'javascript:__doPostBack("master$btnCopy","");return false;'}).insertAfter('#master_btnAdd');
$('#master_customBtnCopy').children().attr('data-icon', copyIcon);
</script>
Which should give you
Advisory Consultant
2020-09-28 01:43 PM
Corey, I don't think we're using Material Icon yet within the record but you can use the old icon set.
<script type="text/javascript">
var copyIcon = '';
$('#master_btnAdd').clone().attr({'id': 'master_customBtnCopy', 'title': 'Copy', 'onclick': 'javascript:__doPostBack("master$btnCopy","");return false;'}).insertAfter('#master_btnAdd');
$('#master_customBtnCopy').children().attr('data-icon', copyIcon);
</script>
Which should give you
Advisory Consultant
2020-09-28 01:45 PM
Thank you! I didn't even think to use the old set.