Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

how to write success event of a database service using javascript

Like the example you gave for invoking a service which requires parameters as above :
serviceName.execute({data: {"parameter1": "val", "parameter2": val},
success: function(){
//some code
}});

I wanted a similar code for invoking an update service with parameters $set and where clause

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

how to write success event of a database service using javascript

Hello Enfiled,

Please add object "parameters" into the query object:

restserviceName.execute({data:{"name":"test", "age":"35"}, parameters:{"_id":"542eaaefe4b013192ec34d9f"}});

here _id - necessary parameter (542eaaefe4b013192ec34d9f - object's which need update ID)
{"name":"test", "age":"35"} - list of fields which need update

Return to “Issues”