- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019 08:42 AM
I want to pass Trouble shooting number from server to client below is the code
Note : Scoped application
HTML
<div class="panel panel-default panel-body m-t m-b">
<button class="btn btn-primary btn- block" ng-click="c.execute()">Execte Error Code</button>
</div>
Client script
function() {
// /widget controller /
var c = this;
c.execute= function(){
c.server.update().then(function(response){
c.data ={};
alert(c.data.troubleshooting);
})
}}
Server Script
(function() {
var gr = new GlideRecord('x_qune_ca_troubleshooting');
gr.initialize();
gr.insert();
var strTroubleShootingNumber = gr.number;
gs.eventQueue('x_qune_ca.execute_analysis', gr, strTroubleShootingNumber, '');
gr.status = 'analyzing_cmdb_logs';
gr.update();
troubleshooting={};
troubleshooting.strSysID = gr.sys_id;
troubleshooting.strTroubleShootingNumber = gr.number;
})();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019 09:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019 08:51 AM
did you tried
alert(c.data.troubleshooting.strTroubleShootingNumber);
or
alert(c.troubleshooting.strTroubleShootingNumber);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019 09:08 AM
tried this but no luck

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019 09:22 AM
can you remove c.data ={}; before alert

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019 09:00 AM
Hello,
You will have to put troubleshooting number in data object on server side, like
data.troubleshootingnumber = gr.number;
data object is passed from server side to client side and input object is passed from clienside to serverside.