How can UI macro call a serverScript(like script include) to update record

bai
Tera Contributor

Greetings lovely Ladies and Gentlemen.

I want use the Change button (UI marco)to update some tables some records, like the picture

now the button is working but I dont know how to query and update tables in Jelly script

please help me! Would be grateful for any help.

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

You can call script include from UI macro using <script> tag and GlideAjax like below

 

<script>  
function showRelatedList(reference) {  
  var ga = new GlideAjax('HelloWorld');  
ga.addParam('sysparm_name','helloWorld');  
ga.addParam('sysparm_user_name',"Bob");  
ga.getXML(HelloWorldParse);  
}  
</script>

 

Regards,

Sachin

View solution in original post

2 REPLIES 2

AnirudhKumar
Mega Sage
Mega Sage

Simple.

Use glideajax to call a script include

sachin_namjoshi
Kilo Patron
Kilo Patron

You can call script include from UI macro using <script> tag and GlideAjax like below

 

<script>  
function showRelatedList(reference) {  
  var ga = new GlideAjax('HelloWorld');  
ga.addParam('sysparm_name','helloWorld');  
ga.addParam('sysparm_user_name',"Bob");  
ga.getXML(HelloWorldParse);  
}  
</script>

 

Regards,

Sachin