Page 1 of 1

Mappings Returns Null

Posted: Wed Jun 17, 2015 10:03 pm
by Kapow36

I have a application I just started. I have a custom service that does some mapping, but it only returns null. I used the import tool to generate the mapping response, so the data is in the correct format and is getting passed in. I've posted some screenshots.

Here is the service mapping, the javascript for these just logs to the console the value.

Image

Here is the service itself, it has a custom javascript implementation.

Image

Here is the custom implementation, it logs the string that it passes in to get mapped. I used this to import the response.

Image

The data logged to the console looks like this:

{"Data":[{"EMPLOYEEID":[{"data":"A"}],"COMPANYID":[{"data":"B"}],"DEPARTMENTID":[{"data":"null"}],"STATUS":[{"data":"Gone"}],"RETURNTIME":[{"data":"June, 17 2015 00:00:00"}]}]}

But the mapping just returns null, and it was working on Monday.

Thanks!


Mappings Returns Null

Posted: Thu Jun 18, 2015 2:37 pm
by Serhii Kulibaba

Hello,

Please remove JSON.stringify from setting.success method. Your service should return a JSON object, not a string.


Mappings Returns Null

Posted: Fri Jun 19, 2015 1:03 am
by Kapow36

Thanks!