Sim Greenbaum
01/13/2025, 10:49 PMfunction recordsTableGenerate(records, tableID, excludeRowNumber) {
if (records === null || records.length === 0 ) {
return `<body style="text-align: center;">
<span style="font-size: 20px; color: red;">There are no records to display,</span>
<span style="font-size: 20px; color: red;"> Try refreshing the page</span>
<br></br>
<button onclick="refreshPage()">Refresh Page</button>
<script>
// JavaScript function to refresh the page
function refreshPage() {
window.open("<https://xxxx.app.netsuite.com/app/center/card.nl?sc=-29&whence=>", "_self")
}
</script>
</body>`;
}
// l
Anthony OConnor
01/13/2025, 11:02 PMAnthony OConnor
01/13/2025, 11:03 PMAnthony OConnor
01/13/2025, 11:03 PMAnthony OConnor
01/13/2025, 11:04 PMAnthony OConnor
01/13/2025, 11:08 PMwindow.location.reload()
should be all you need?Sim Greenbaum
01/13/2025, 11:17 PMAnthony OConnor
01/13/2025, 11:38 PMAnthony OConnor
01/13/2025, 11:39 PMerictgrubaugh
01/14/2025, 1:00 AMwindow.location.reload()
to do the trick.
For redirecting to the home page, you can use url.resolveTaskLink to dynamically determine the relative URL of the home page (e.g. so you don't have to care about computing the account ID for sandox/production). The card id
of the home page is CARD_-29
.
You can then use the resulting relative URL as the input for window.location.assign.Sim Greenbaum
01/14/2025, 3:33 PMSim Greenbaum
01/14/2025, 3:34 PMerictgrubaugh
01/14/2025, 3:36 PMwindow.location.assign('/app/center/card.nl?sc=-29')
from the client sideSim Greenbaum
01/14/2025, 4:41 PMAnthony OConnor
01/14/2025, 4:44 PMSim Greenbaum
01/14/2025, 4:45 PMAnthony OConnor
01/14/2025, 4:45 PMSim Greenbaum
01/14/2025, 4:46 PMAnthony OConnor
01/14/2025, 4:46 PM