asp.net - How to Execute Javascript in documentdb -
how execute js file in client.executestoredprocedureasync(); not send result
function simple(useid) { var collection = getcontext().getcollection(); var isaccepted = collection.querydocuments( collection.getselflink(), "select * c c.id='" + useid +"'"); }
you want set stored procedure response in callback querydocuments()
.
for example:
function simple(useid) { var collection = getcontext().getcollection(); var isaccepted = collection.querydocuments( collection.getselflink(), "select * c c.id='" + useid + "'", {}, function(err, documents, responseoptions) { getcontext().getresponse().setbody(documents); }); }
Comments
Post a Comment