Getting error "Cannot read property "t" from undefined" while transferring variable from client controller to server script in widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 12:27 AM
Hi All,
I am working with widget, while transferring data from client controller to server script, I am getting error.
Server JavaScript error Cannot read property "t" from undefined
Client controller:
c.closemodel = function() {
c.data.t=c.note;
c.server.update();
alert("Your notes are saved");
}
Server Script:
gs.setProperty("notes",input.t,"description");
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 12:43 AM
Hi,
Can you please share complete code in Server server script where you are using input.t?
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 12:47 AM
Hi,
I am writing this line inside the function .
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
gs.setProperty("notes",input.t,"description");
})();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 12:48 AM
you have to use it like below:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
if(input){
gs.setProperty("notes",input.t,"description");
}
})();
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 01:00 AM
Thanks Anil...now it is working.