This is a migrated thread and some comments may be shown as answers.

Can't update any Type or User

1 Answer 40 Views
Bugs & Issues
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Francisco
Top achievements
Rank 1
Francisco asked on 21 Jul 2016, 11:36 PM

Hi everyone!

I'm new in Telerik and I'm using the Backend Services with some Types and Users. So far, I can create and read elements in my Types and Users, but I can't update the information.

I have a form with the current user data, the user can update this data, so I do this when the submit button is clicked:

el.Users.updateSingle({
        'Id': id,
        'DisplayName': 'new display name',
        'Email': 'the new email'
    }, function(data) {

       console.log("Saved: ");
        console.log(data);
    }, function(error) {

        console.log("Error: ");

        console.log(error);
    });

The id is correct, but I get an "Error: " message. The problem here is that Telerik gives me an "undefined" error, so, my log shows:

Error:

undefined

 

Then, I can't save my user data, nor to know what the problem is...

The same issue happens with other Types...

Why this happen?

Note: I try to put and invalid user id, and I get an 2001 error, this means that Telerik is receiving my request, but when I send an correct id, it simply gives me an "undefined" error....

Thank you for your answers and sorry for my english.

 

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 25 Jul 2016, 03:29 PM
Hello Francisco,

I tried to reproduce the behavior you are describing, but to no avail. The code seems to work just fine on my end, thus I would like to ask you to help me in identifying the problem by asking you a few questions:
  1. What is the SDK version that you are using? I tried with 1.6.12. You can read how to check your SDK's version here: http://docs.telerik.com/platform/backend-services/javascript/getting-started-javascript-sdk#checking-the-sdk-version
  2. Can you please check what request is being send to our servers and what is the response that you are receiving? This can be done in the Network tab of Chrome - https://developers.google.com/web/tools/chrome-devtools/profile/network-performance/resource-loading?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3
  3. Maybe you have some cloud code that transforms the response wrongfully?

Looking forward to your response.

Regards,
George
Telerik by Progress
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
Bugs & Issues
Asked by
Francisco
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or