Yes, there is no way to achieve this through JavaScript only. You need use workflows or power automate flows.