Using bootstrap i make a data table which is working fine in localhost. But when i add that code snippet to my portlet in NetSuite dashboard table is showing but pagination and search box is not showing.[Data Table in Netsuite Dashboard][1] '''
define(['N/file'],
function (file) {
function render(params) {
params.portlet.title = 'Services';
var myvar = '<!DOCTYPE html>' +
'<html lang="en">' +
'' +
'<head>' +
' <title>Bootstrap Example</title>' +
' <meta charset="utf-8">' +
' <meta name="viewport" content="width=device-width, initial-scale=1">' +
' <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">' +
' <link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/dataTables.bootstrap4.min.css">' +
'</head>' +
'<style type="text/css">' +
' div.dataTables_wrapper {' +
' margin-bottom: 3em;' +
' }' +
'</style>' +
'<body>' +
' <div class="container-fluid">' +
' <table id="" class="table table-striped table-bordered display" style="width:100%">' +
' <thead>' +
' <tr>' +
' <th>Name</th>' +
' <th>Position</th>' +
' <th>Office</th>' +
' <th>Age</th>' +
' <th>Start date</th>' +
' <th>Salary</th>' +
' </tr>' +
' </thead>' +
' <tbody>' +
' <tr>' +
' <td>Tiger Nixon</td>' +
' <td>System Architect</td>' +
' <td>Edinburgh</td>' +
' <td>61</td>' +
' <td>2011/04/25</td>' +
' <td>$320,800</td>' +
' </tr>' +
' <tr>' +
' <td>Garrett Winters</td>' +
' <td>Accountant</td>' +
' <td>Tokyo</td>' +
' <td>63</td>' +
' <td>2011/07/25</td>' +
' <td>$170,750</td>' +
' </tr>' +
' <tr>' +
' <td>Michael Bruce</td>' +
' <td>Javascript Developer</td>' +
' <td>Singapore</td>' +
' <td>29</td>' +
' <td>2011/06/27</td>' +
' <td>$183,000</td>' +
' </tr>' +
' <tr>' +
' <td>Donna Snider</td>' +
' <td>Customer Support</td>' +
' <td>New York</td>' +
' <td>27</td>' +
' <td>2011/01/25</td>' +
' <td>$112,000</td>' +
' </tr>' +
' </tbody>' +
' </table>' +
' </div>' +
' <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>' +
' <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>' +
' <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>' +
' <script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>' +
' <script src="https://cdn.datatables.net/1.10.24/js/dataTables.bootstrap4.min.js"></script>' +
' <script type="text/javascript">' +
' $(document).ready(function() {' +
' $(\'table.display\').DataTable();' +
' });' +
' </script>' +
'</body>' +
'' +
'</html>';
var content = '<td><span><b>Hello!!!</b></span></td>';
params.portlet.html = myvar;
}
return {
render: render
};
});
''' [In Local Data Table][2] [1]: https://i.stack.imgur.com/rfG1x.png [2]: https://i.stack.imgur.com/4A2pt.png