I think the problem lies with the FSX object. Where is this loaded?
If it has not been loaded before the script defining your module executes, the code will error out and Crm will be undefined.
There is a nicely written article here about loading dependant libraries for a CRM form.
It proposes are a number of solutions: 1) Use RequireJs or HeadJs to dynamically load your dependant scripts. 2) Loading Libraries by including them in Ribbon commands.