From where is Event sn_hr_core_case.commented triggered when there is a comment in an HR Case (HRSD)

Dinh Nguyen
Kilo Sage

Hello everyone,

Every time I comment on an HR Case ticket on the portal, an email is sent through the event sn_hr_core_case.commented. However, I don't know where this event is triggered from. I have checked both Business Rules and Script Includes but couldn't find it. If anyone knows, please help me.
Thank you so much.

DinhNguyen_0-1753175402977.png

 

1 ACCEPTED SOLUTION

Hi @Dinh Nguyen ,

 

That is the BR. you can see there are no conditions in the BR and it's calling the script include and the line 278's block is satisfying and it's firing the event 

 

the event is being fired when the comments are added

 

the reason why it doesn't send notification on "Close Complete" and "Close Incomplete" states in these states are inactive states (case will be active=false)

 

and if you look at the OOB notification conditions the case should be active in order to trigger the email

ChaitanyaILCR_0-1753240057040.png

 

you can try adding a comment in a Close Complete case and check the event logs 

you will find the event there

 

hope this clears things out

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

7 REPLIES 7

Shraddha Kadam
Mega Sage

Hello @Dinh Nguyen ,

 

Please check the workflow or flow designer as well.

If my response was helpful, please mark it as correct and helpful.
Thank you.

Hi @Shraddha Kadam ,

Thank you for your response. I have marked the answer to my question.

Ankur Bawiskar
Tera Patron
Tera Patron

@Dinh Nguyen 

these are OOTB events and are triggered from platform.

you can search with business rule or script include contains that event name.

@Chaitanya ILCR already pointed out the scripts.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Chaitanya ILCR
Kilo Patron

Hi @Dinh Nguyen ,

this BR Send sn_hr_core_case events

ChaitanyaILCR_0-1753179777677.png

it calls script include 

ChaitanyaILCR_1-1753179851917.png

and line no 278 fires the event

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya