- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 11:18 PM
Hi all.Am working on service portal,trying to pass values from client side to server side. Tried the following code but am getting nothing on console log.
Client side:
function() {
/* widget controller */
var c = this;
c.data.val='abcdefg';
c.update = function() {
c.server.update().then(function (response) {
c.data = {};
})
}
}
Server side:
(function() {
if(input)
{
console.log(input.val);
}
})();
whats wrong with my code?Please advice!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 11:34 PM
Try client script as beloow,
function() {
/* widget controller */
var c = this;
c.server.get({
val:'abcdefg'
}).then(function(r){
});
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 11:24 PM
Hi
function() {
/* widget controller */
var c = this;
c.data.val='abcdefg';
c.update = function() {
c.server.update();
})
}
}
Just try this once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 12:24 AM
There is a syntax error in your code I guess please check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 11:34 PM
Try client script as beloow,
function() {
/* widget controller */
var c = this;
c.server.get({
val:'abcdefg'
}).then(function(r){
});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 12:39 AM
Can you share any link to know more about server methods?(i.e server.get/server.update).