How to pass data from server/ client script to HTML field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2022 07:48 AM
I need the description of the record to be placed at a HTML text area value in the portal.
Ho can I achieve this.
- Labels:
-
Service Portfolio Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2022 08:18 AM
Hi Bharath kumar,
You can use below code in widget that will copy description of record to HTML body.
HTML Script:
<div>Description<br><textarea ng-model=data.description>Enter text here...</textarea></div>
Server side Script:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
var inc = new GlideRecord('incident');
inc.get('57af7aec73d423002728660c4cf6a71c');
data.description=inc.description.toString();
})();
I hope this will work.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2022 10:56 AM
Hi,
Please refer below video
Please mark my response as correct or helpful if applicable