c.server.update() doesn't work and i don't know why

anchor
Kilo Contributor

My client controller capture event from another widget and update the server by c.server.update() but it doesn't work,

the server side has no refresh and no output.

Client side(call c.server.update()):

find_real_file.png

server side:

find_real_file.png

(No 'kpi data' and 'submit' as console output )

It's urgency and need your kind kelp!! 

6 REPLIES 6

Rob Joy
Tera Expert

I had a similar problem recently.

I tried to use c.server.update() in a widget.

I was using the call in a $rootScope.$on function.

I added a gs.log in the first line of the server code.  I tried a bunch of ways (c.server.update() $scope.server.update(), spUil.update()).  None of them worked.

As I looked at other places where I had used c.server.update(), I noticed that all of them were in response to a post from the HTML on my client code.

I changed the call to c.server.get({input Object with data values you want to send back to server})

Using the get call worked.  I hope that helps someone resolve this issue.

Thank you so much Rob, I tried by using c.server.get method it worked for me.