Any suggestions would be greatly appreciated. --&g...
# suitescript
s
a
You should be able to get away with this with a simple event listener in the button you are creating:
document.getElementById('custpageworkflow157).click();
Untitled
b
it sounds like you want to click a button that you dont control
if you are, you might want to instead use window.open to open a new window, use the new window to select and click the button like alien4u suggested, then use window.close to close the new window
s
'<html><script> var window = window.open("document.getElementById("View").addEventListener("click", function(){document.getElementById("custpageworkflow157").click();"); </script><a class="fancy-link" name="View" id="View" href="<https://xxxxx-sb1.app.netsuite.com/app/common/custom/custrecordentry.nl?rectype=142&id='||{internalid}||'>"target="_blank">Check-In</a></html>'+
Struggling to get this going; just ignores the <script> tag code.
a
Looks like you try to combine both advices into one, that does not work, this does not look right to me:
window.open("document.getElementById("View").addEventListener
s
Okay, I will continue to research how to do this properly.
'<script>  var URL = "<https://4778042-sb1.app.netsuite.com/app/common/custom/custrecordentry.nl?rectype=142&id='||{internalid}||'>"; var myWindow = window.open(URL, "myWindow", "width=600,height=600");  myWindow.document.getElementById("custpageworkflow157").click(); myWindow.close(); </script>'
can't get the "custpageworkflow" button click to fire.
Nevermind, I figured it out. Thank you for your help BTW.
👍 1