- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023 10:28 AM
Hello,
What is wrong with the below client script?
The sys_id shows up correctly, but nothing else appears.
Table: Change Request
Type: onLoad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023 10:47 AM
HI @DoDo labs___ ,
You should be writing this server side script either in script include or business rule, for this requirement you can create a display business rule and use g_scratchpad to send the latest work notes to client side and then display it as alert, please follow these steps:
Step 1: create a display business rule on change_request table
Use this script:
(function executeRule(current, previous /*null when async*/) {
g_scratchpad.workNotes = current.work_notes.getJournalEntry(1);
})(current, previous);
Step 2: Update your client script and make these changes:
function onLoad() {
alert(g_scratchpad.workNotes);
}
If my answer has helped with your question, please mark it as correct and helpful
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 04:10 AM
Thank you for your help!