its printing previous and current work notes while chnaging state but when we updating worknotes it
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 08:50 AM
its printing previous and current work notes while chnaging state but when we updating worknotes it not getting priting current work notes but in activity its returning whenever we are updating working anything its returning all .
var state = "";
var specialcomment = "";
var aworknote = "";
// var acomment = "";
var demistocomment = "";
var worknotes = "";
if (current.state.toString() == '2') {
current.work_notes = "State changed to:" + current.getDisplayValue('state');
gs.log("work_notes change for state in progress" + current.work_notes);
//var demistocomment = current.work_notes + current.comments.toString() + specialcomment;
demistocomment = current.work_notes;
gs.log("Work_notes and comment and resolution code and resolution notes" + demistocomment);
} else if (current.state == '3') {
if (current.hold_reason == '5' || current.hold_reason == '4' || current.hold_reason == '1') {
current.work_notes = "State changed to:" + current.getDisplayValue('state') + "and reason is:" + current.getDisplayValue('hold_reason');
var testing = current.work_notes;
// demistocomment = current.work_notes + '\n\n' + current.comments.getJournalEntry(1) + current.work_notes.getJournalEntry(1);
//demistocomment = current.comments + '\n' + current.work_notes;
gs.log("Work_notes and comment and resolution code and resolution notes" + demistocomment);
// }
}
if (current.work_notes.changes()) {
var worknote = current.work_notes.getJournalEntry(1);
var worknoteContent = worknote.toString().split("(Work notes)");
aworknote = worknoteContent[1].trim();
demistocomment = demistocomment = aworknote + '\n' + testing;;
gs.log("printing work notes testing:" + demistocomment);
} else {
//demistocomment = aworknote + '\n' + testing;
demistocomment = current.work_notes.getJournalEntry(1);
gs.log("testing single worknotes" + demistocomment);
}
if anyone know please let us know.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 05:10 AM
Hello @sangitakumari ,
Not able to understand your exact issue. Please elaborate it more.
Thank You!
Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
Thank you!!
Dnyaneshwaree Satpute
Tera Guru