Forum Post: RE: Sending array objects in JSDO back to OpenEdge Rest Server

  • Thread starter Thread starter egarcia
  • Start date Start date
Status
Not open for further replies.
E

egarcia

Guest
Hello, ProDataSource extent value must be a valid DataSource Handle. The error message that you are getting is thrown by the abstract Business Entity in 11.4 that is used in generated Business Entities. The error message is thrown when the hDataSourceArray variable has not been initialized. This could happen with Business Entities created from a schema file. This issue would not happen if you create the Business Entity from a database table. To fix this issue, you need to change the following code: /* TODO Fill in with appropriate data-sources */ /* hDataSourceArray[1] = DATA-SOURCE src db-table :HANDLE. */ To look like the following: hDataSourceArray[1] = DATA-SOURCE srcCustomer:HANDLE. Once you correct this issue, the generic service that you wrote should work. As mentioned, your generic service seems to be fine. However, another alternative, is to change use the Submit service part of the Mobile App Builder project. For this, you would create the Business Entity from a database table using te CRUD + Submit option. The generated code will then use a DataSet which is needed to handle before-image information. (From the Network activity that you posted, it looks like your Business Entity is for a temp-table and not for a DataSet.) Then you would just need to process the values in localStorage and then call the Submit service. (Internally, the code would behave very similar to your generic service and use saveChanges(true).) (The code to process the values in localStorage would most likely live in a JavaScript function instead of the generic service.) I hope this helps.

Continue reading...
 
Status
Not open for further replies.
Back
Top