Accessing CRM.CreateQueryObj from Workflow rule action Display Field for Amendment

I'm carrying out some development at the moment where I need to run the CreateQueryObj method of the CRM object from inside the OnChange script of the workflow rule action Display Field for Amendment. The issue that I have is CRM is undefined.

The Display Field for Amendment is a date. What I would like to do is on change of date, check the existing opportunities for an occurrence of that date in the relevant field. If an opportunity already exists on that date, advise the user accordingly.

Can this be achieved in Sage CRM 2017?