#6 Technical Best Practices of Client Scripts in ServiceNow | Client Scripts in ServiceNow

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

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

  • @codewithsakshi4180
    @codewithsakshi4180 5 месяцев назад

    thanks a lot sir.

  • @Evilasdevil
    @Evilasdevil 3 года назад +1

    Awesome series Sir, Stay safe , please make a series on flow designer

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

      Thanks, Flow designer series will be published soon.

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

      @@SAASWithServiceNow Thank you

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

    Hi Gaurav, Thank you for the videos. Always helpful!! Question: Can you please let me know how to write script to add, remove and modify columns in existing table? During development we often do it and it would be nice if we have script that we can run across multiple environments to deploy changes. I found this mini script "SncTableEditor.createElement("cmn_location", "My reference3", "my_reference3", "reference", "32", "alm_asset", "alm_asset", "global");" to add "My Reference3" column in cmn_location and we can run this in Background script section, however there is no details available over internet. Seriously!! do you know where to find more details about it/or any other best way to deploy table schema related changes?

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

      SncTableEditor is part of java packages which should not be used. If you want to create field with script then you can directly create with glide record initialization in sys dictionary.

  • @vakacharlavyshnavi5382
    @vakacharlavyshnavi5382 3 года назад +1

    Not Recommended to use glide record is fine. But is there any reason why we should not use??

    • @SAASWithServiceNow
      @SAASWithServiceNow  3 года назад +3

      Server look up will always be time consuming on client and Glide record will also be synchronous call. Its better to GlideAjax or scratchpad.

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

      @@SAASWithServiceNow I don't see how code like this is worse than GlideAjax or scratchpad
      var gr = new GlideRecord('sys_user');
      gr.addQuery('name', 'Joe Employee');
      gr.query(myCallbackFunction); //Execute the query with callback function
      //After the server returns the query recordset, continue here
      function myCallbackFunction(gr){
      while (gr.next()) { //While the recordset contains records, iterate through them
      alert(gr.user_name);
      }
      }

  • @kkeerthi3143
    @kkeerthi3143 2 года назад

    Hi.. give the link for server Script Video