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?
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.
@@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); } }
thanks a lot sir.
Awesome series Sir, Stay safe , please make a series on flow designer
Thanks, Flow designer series will be published soon.
@@SAASWithServiceNow Thank you
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?
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.
Not Recommended to use glide record is fine. But is there any reason why we should not use??
Server look up will always be time consuming on client and Glide record will also be synchronous call. Its better to GlideAjax or scratchpad.
@@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);
}
}
Hi.. give the link for server Script Video