Support Topics Documentation Slack YouTube Blog

Backendless.CustomServices is undefined

(Phil) #1

I have a custom service hosted on the business logic tab. When I download the javascript API, sometimes CustomServices is undefined and it crashes because it can’t call invoke. This is the line that crashes it: Backendless.CustomServices.invoke. I’m not sure why. I don’t change any code. It’s just sometimes it works and sometimes it doesn’t. Any idea what could be happening?

(Stanislaw Grin) #2


I think this can happen if javascript SDK is loaded asynchronously and sometimes does not have time to initialize. Make sure that the library is always loaded before the init method is called.


(Phil) #3

Thank you. Problem is resolved.