Order it to cast the spell which the custom one was based on. As it was based on that spell it uses that order to cast. Note it will bug if you use the same base ability multiple times with most spells, the same as if you manually cast one.
If you use JASS integer ID ordering, you can get a unit to cast more different abilities than in GUI.