Hi Support,
May I know can $this.db.get can pass the result into and stored as variable for global variable? In the following, the "return data.aws_ticket_id" has indeed stored the id value, but I have struggling to find out the way to use it in global context
GetStoredData : function(f_ticket_id) {
this.$db.get("ticket: " + f_ticket_id + "").done(function(data) {
return data.aws_ticket_id;
})
.fail(function(err) {
return err;
});
}
I have tried first declare in global context:
var f_ticket_id = domHelper.ticket.getTicketInfo().helpdesk_ticket.display_id;
then
console.log(self_GetStoredData(f_ticket)); --> return "undefined"
Appreciate your help!
Keen