Best solution to fetch parent category via script.

as00929632
Tera Contributor

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.

 

1 REPLY 1

SanjivMeher
Kilo Patron
Kilo Patron

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.