How do you call a function on a specific instance of a type?



You need to use the get() function to obtain the instance of the type desired.

Sample syntax: Type.function(Type.get(instance))


Member functions can be invoked in 2 different ways:

var instance = MyType.get('someId');
instance.memberFunc(); // Directly on the instance
MyType.memberFunc(instance); // As a static function, where you need to provide the instance as the first argument.