Issue with api.Entity Helper

Having an issue with the api.Entity().Data().Update() helper.

The only reason I can deduce is my JSON response returns a unquoted number;

      "booking_arrival":"2015-11-18 14:00:00",
      "booking_departure":"2015-11-21 10:00:00",

This is my test script;

I can get a response of the number for booking_id

If I change the helper to use the booking_id i get;

Update function accepts string data. Ensure you’re sending a string. For example try responseObject.booking_id +'';

1 Like

This is along the lines of what was thinking, believe the Json is valid as “quotes” not needed on number values I think.

So add a space after to make it a string rather than number. Did try changing the entity field to number but didn’t help.

Not even a space. Just appending empty quotes will turn the variable into a string.

1 Like

Thanks will try tomorrow, off for Christmas lunch with family, happy Christmas everyone :slight_smile:

1 Like