This topic contains 2 replies, has 0 voices, and was last updated by tect22 7 years, 3 months ago.

  • Author
    Posts
  • #5856 Score: 0

    hv85
    • Contributions: 0
    • Level 1

    Hi all,

    I’m trying to trigger the clear all lines button on a purchase request via a client side script. Is there a way to tap into this element via jQuery and trigger the onclick event? I tried:

    jQuery(‘#clearsplitsitem’).click()

    But it doesn’t work.

    Has anybody else managed to trigger a button click before in NS script or accessed the internal NS method behind a button?

    Thanks.
    This is a cached copy. Click here to see the original post.

  • #5857 Score: 0

    Vesku1980
    • Contributions: 0
    • Level 1

    (function(){

    var el = document.getElementById(“ok”);

    el.addEventListener(“click”, function() {

    alert (‘Clicked!’)

    })

    }());

  • #5858 Score: 0

    tect22
    • Contributions: 0
    • Level 1

    Hi hv85 ,

    You can achieve this by triggering the NetSuite Function for the button.

    For expense sublist: clear_splits(‘expense’);

    For item sublist: clear_splits(‘item’);

    Regards.

You must be logged in to reply to this topic.