Page 2 of 2

how to write success event of a database service using javascript

Posted: Tue Jul 28, 2015 5:54 pm
by Enfiled Riders

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


how to write success event of a database service using javascript

Posted: Mon Aug 03, 2015 8:21 am
by Serhii Kulibaba

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