[ESS] How Do I Add a Button to a Suitelet in NetSuite?

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 13

  • @marfilcastor7934
    @marfilcastor7934 4 года назад +4

    i love all of your video

  • @krejcij
    @krejcij 10 месяцев назад

    Thank you very much for your videos. Started learning SuitScript few months back so having videos like yours is super helpful 🙂 I followed your example but instead of redirecting to specific record, can I redirect from a button to a home page? or a list? From client side script. Thank you.

    • @StoicSoftware
      @StoicSoftware  10 месяцев назад +1

      N/redirect is server-side only, so you won't be able to use it from a Client Script. In a Client Script, you can just set `window.location` to the URL (can be a relative URL) of the page you want to show.

    • @krejcij
      @krejcij 9 месяцев назад

      @@StoicSoftware Thank you, used window.location.replace(url of home page of netsuite) and works!

  • @StoriesByDighe
    @StoriesByDighe 3 года назад

    Fantastic

  • @StoriesByDighe
    @StoriesByDighe 4 года назад

    Hey! Just bought the SS Curriculum, and was hoping for lots more data on creating a suitelet that allows for grabbing data from user entered data from rendered form, and using that data as filters on a saved search and rendering that search (all without needing a netsuite login)
    I understand the GET function and calling the suitelet to render the search by itself, but can I add fields and use that to filter the results before rendering?
    Any links or video help?

    • @StoicSoftware
      @StoicSoftware  4 года назад +2

      You use the N/ui/serverWidget module to add fields and a native Submit button to your Form (see Help:Form.addSubmitButton). When the user clicks the Submit button, a POST request is automatically submitted to your Suitelet. In your POST handler, you can read the user-submitted form data via the ServerRequest instance passed in to your function. HTH

    • @StoriesByDighe
      @StoriesByDighe 3 года назад

      @@StoicSoftware nice! Thank you so much

  • @marfilcastor7934
    @marfilcastor7934 4 года назад

    what kind of client script entry point is used in this module?

    • @StoicSoftware
      @StoicSoftware  4 года назад +3

      None. There is no associated Script Record for the Client Script, so no entry point function is needed. The "Client Script" is just a module source file in the File Cabinet which the Suitelet attaches to the Form as the Form is generated. The Client Script contains only the button click handler function(s).

  • @computersebaboard
    @computersebaboard 4 года назад

    Hey Stoic, I have a suitelet that has fields like Start date and end date..I need to check for validation of Start and End date using Client Script.... How to call that client script from Suitelet ?

    • @StoicSoftware
      @StoicSoftware  4 года назад

      You don't call Client Scripts from Suitelets. You attach a Client Script to a Form or List object just like I do in this video, then you implement the event handlers like you would in a record-based Client Script. Sounds like you want the `validateField` event.

    • @computersebaboard
      @computersebaboard 4 года назад +1

      @Stoic Software Yeah exactly Stoic..I want validatefield event only...Thanks for making the awesome video with clear explanation..I am trying to implement the logic watching your video......Let's see what happens...Thanks man!!!