- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 12:34 AM
Hi,
Onboarding tasks- comments on task level roll up to parent.
As an HR Agent, if an employee or manager submits a comment on an Onboarding task, I can see all of the comments on the HR Case.
When employee or manager submits comment on Onboarding task then I should see all comments on HR case.
Can anyone please help me to achieve it.
Regards,
Nivedita
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 08:26 AM
@niveditakumari Deactivate your business rule in HR Core scope and create a copy of the same Business rule in Human Resources Lifecycle Events scope along with the same script. Ideally, this will address your scope error issue as the worknotes would be added into the LE scope only.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 03:03 AM
@niveditakumari There is an OOTB Business rule Validate Changes which rolls up the worknote to parent case already. Hence work_notes added by employee or manager should also roll up automatically unless they are adding additional comments instead of a work note.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 07:41 AM
HI @Sandeep Rajput ,
Thank you so much for your reply.
Yes you are correct this functionality is already available for worknotes.
I have to do this for additional comments. When employee or manager add additional comments it should show in HR case.
Can you please help me to get this done.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 08:08 AM
@niveditakumari Here comes the solution. Please create an onBefore Update business rule on HR Task and configure it as follows.
Here is the script for the business rule
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(current.parent){
var parentHRCase = current.parent.getRefRecord();
parentHRCase.comments = current.comments.getJournalEntry(1);
parentHRCase.update();
}
})(current, previous);
Please mark my answer correct and helpful if it manages to solve your problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2023 03:19 AM
Hi @Sandeep Rajput,
I tried this approach but it is showing this error.
Can you please help me with it.
Regards,
Nivedita