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

  • Author
    Posts
  • #5856

    hv85

    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

    Vesku1980

    (function(){

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

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

    alert (‘Clicked!’)

    })

    }());

  • #5858

    tect22

    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.