Best solution to fetch parent category via script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 09:15 AM - edited 04-30-2025 09:15 AM
While creating submitting a catalog item, we are fetching the top most parent category and storing it in a variable and then using it to display on the form.
Our challenge is , on prod environment, hundreds of RITMs are submitted by end users every hour. Every time a RITM is submitted, our function calls script include to get the top most parent category name based on the which catalog item is used to submit ticket. These many script calls in a short span of time is creating slowness as multiple events are generated in backend.
Please suggest the best optimized code to achieve this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 09:52 AM
Can you provide the current script that you are using?
Did you use an event so that this runs asynchronously?
Another option would be to create a field in catalog item and set the parent category in the catalog item itself using a scheduled job on a daily basis. Then just use that to display on the RITM.
Please mark this response as correct or helpful if it assisted you with your question.