ServiceCenterModel is undefined

ServiceCenterModel is undefined

  

Hello OutSystems community,


I was wondering if you could help me with understanding an issue I had with the platform.


After sucessfully compiling and publishing a mobile application, I was confronted with a JavaScript error. "ServiceCenterModel is not defined." After inspecting the source on my web browser I find the error here.

This looks like a function definition to the ServerDataSync action in the Logic Tab. More specifically an output parameter with DataType User record. Looking at my other output parameters I saw that all of them except this one was referring to my local defined Entities. I am assuming that the error is clearly saying that it doesn't recognise this variable or global.

I fixed the issue by just refactoring that particular parameter to a List of User records instead of a single record.


Does anybody have an idea why that piece of generated code produces an error?

Solution

Ricardo Romero wrote:

Hello OutSystems community,


I was wondering if you could help me with understanding an issue I had with the platform.


After sucessfully compiling and publishing a mobile application, I was confronted with a JavaScript error. "ServiceCenterModel is not defined." After inspecting the source on my web browser I find the error here.

This looks like a function definition to the ServerDataSync action in the Logic Tab. More specifically an output parameter with DataType User record. Looking at my other output parameters I saw that all of them except this one was referring to my local defined Entities. I am assuming that the error is clearly saying that it doesn't recognise this variable or global.

I fixed the issue by just refactoring that particular parameter to a List of User records instead of a single record.


Does anybody have an idea why that piece of generated code produces an error?

Hello Ricardo,


The problem you have identified is a known-issue with the GA version (10.0.105.0) of the platform server. It has already been fixed in platform server version 10.0.200.0, which can be found at https://www.outsystems.com/home/downloads/


Fortunately, you have already identified a workaround for the said problem, so until your platform server has been updated to the new 10.0.200.0 version, you will have to continue using it. For the record, you do not need to change to type of the output parameter to a List of Users, it should be enough to change the type of a Record of User, instead of just User type.


If you have any questions, please do not hesitate to let us know.


With best regards,


Stoyan Garbatov

Solution

Stoyan Garbatov wrote:

Ricardo Romero wrote:

Hello OutSystems community,


I was wondering if you could help me with understanding an issue I had with the platform.


After sucessfully compiling and publishing a mobile application, I was confronted with a JavaScript error. "ServiceCenterModel is not defined." After inspecting the source on my web browser I find the error here.

This looks like a function definition to the ServerDataSync action in the Logic Tab. More specifically an output parameter with DataType User record. Looking at my other output parameters I saw that all of them except this one was referring to my local defined Entities. I am assuming that the error is clearly saying that it doesn't recognise this variable or global.

I fixed the issue by just refactoring that particular parameter to a List of User records instead of a single record.


Does anybody have an idea why that piece of generated code produces an error?

Hello Ricardo,


The problem you have identified is a known-issue with the GA version (10.0.105.0) of the platform server. It has already been fixed in platform server version 10.0.200.0, which can be found at https://www.outsystems.com/home/downloads/


Fortunately, you have already identified a workaround for the said problem, so until your platform server has been updated to the new 10.0.200.0 version, you will have to continue using it. For the record, you do not need to change to type of the output parameter to a List of Users, it should be enough to change the type of a Record of User, instead of just User type.


If you have any questions, please do not hesitate to let us know.


With best regards,


Stoyan Garbatov

Good to hear, I have indeed not upgraded to the latest version of platform 10. But good to hear that it has been resolved by the engineering team.

Kind regards,

Ricardo