Close parent incident if all child incident is closed#1737
Close parent incident if all child incident is closed#1737bhavyaa30 wants to merge 2 commits intoServiceNowDevProgram:mainfrom
Conversation
|
Please rewrite the script completely and follow best ServiceNow's best practices. |
There was a problem hiding this comment.
Sorry, but that script is full of issues and makes no sense at all. I don't know where to start and in the end I cannot rewrite everything for you.
However, at least one important hint. The code line "child.parent_incident.update()" will not work. If you want to update the parent record you have to load an individual instance, for example with "getRefRecord()"
For more information please refer https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0745222
And also "hello" loggings do not provide any value and spam the syslog table!
PR Description:
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions