How to check Work Notes has been updated or changed in server side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2016 12:02 PM
Hello Guys,
I have a requirement where I need to send the WorkNotes of Incident from Snow to Remedy.
I am using getJournalEntry(1) to get the last updated work notes and send it to Remedy, till that it is fine.
Now if the WorkNotes is not updated still getJournalEntry(1) will send the same last updated work notes to Remedy, thus making duplicate entries in Remedy.
I wanted to know, How can we check whether WorkNotes has been updated or not. If there is no worknotes then nothing should be sent to Remedy.
FYI: I used current.work_notes.changes(), but that didn't work
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2018 10:29 AM
Hello, I had a requirement to grab the latest Comments or Work Notes only if they are NEW. You can use a script (ex in a Business Rule) to determine whether there has been a change to these fields, example below:
var newWorkNotes;
var newComments;
//get newly added worknotes
if(current.work_notes.changes()){
newWorkNotes = current.work_notes.getJournalEntry(1);
}
//get newly added comments
if(current.comments.changes()){
newComments = current.comments.getJournalEntry(1);
}
Hope this helps,
Danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2019 03:08 PM
Hi Danny,
This helped me out perfectly! Thankyou!
Kr!
Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2019 12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2019 12:54 AM
Hi Snehal,
This didn't help out for me as I wanted this working on 'comments' and that is not available in the dropdown for me. Setting it to 'additional comments' doesn't work.
Kr!
Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2019 09:23 PM
Hi Robin,
On which table you tried creating this BR? Is there no additional comments/worknotes available on the table you tried?