Strange Error while scheduling Service Activity in CRM 2016 – An Error Has occurred. Please return to homepage and try again.

We got a strange error [strange JavaScript popup alert] while scheduling service. Searching for the similar error in google did not help either. It took almost 2 days to narrow down the issue and find the root cause. If you come across the same issue, this post might help you. Issue: An error while scheduling…