Hi there,
You need to enable external data connections. Have a look at this Knowledge Base article: https://support.muhimbi.com/hc/en-us/articles/228090187-InfoPath-Rules-Custom-code-Data-connections-are-not-executed-
Feel free to reach out to
[email protected] if you have any further questions.