oModel.create("/YourCollection", oData, {
success: function(oCreatedEntry) { /* do something */ },
error: function(oError) { /* do something */ }
);
oModel.create("/YourCollection", oData, {
success: function(oCreatedEntry) {
oModel.read("/YourCollection('"
+ oCreatedEntry.ObjectID+"')/?$expand=YourChild", {
success: function(oCompleteEntry) { /* do something */ },
error: function(oError) { /* do something */ }
});
},
error: function(oError) { /* do something */ }
});
oModel.create("/EmployeeCollection", oData, {
success: function(oCreatedEntry) {
oModel.read("/EmployeeCollection('"
+ oCreatedEntry.ObjectID+"')/?$expand=EmployeeCommon", {
success: function(oCompleteEntry) { /* do something */ },
error: function(oError) { /* do something */ }
});
},
error: function(oError) { /* do something */ }
});
oModel.create("/EmployeeCollection", oData, {
success: function(oCreatedEntry) {
oModel.read("/EmployeeCommonCollection/?"+
"$filter=ParentObjectID eq '"+oCreatedEntry.ObjectID+"'", {
success: function(oChildEntry) { /* do something */ },
error: function(oChildError) { /* do something */ }
});
},
error: function(oError) { /* do something */ }
});
oModel.read("/YourCollection...", {
success: function(oRetrievedResult) { /* do something */ },
error: function(oError) { /* do something */ }
});
oModel.read("/YourCollection('...')", {
success: function(oRetrievedResult) { /* do something */ },
error: function(oError) { /* do something */ }
});
oModel.update("/YourCollection('...')", oData, {
merge: true, /* if set to true: PATCH/MERGE */
success: function() { /* do something */ },
error: function(oError) { /* do something */ }
});
oModel.update("/YourCollection('...')", oData, {
success: function() { /* do something */ },
error: function(oError) { /* do something */ }
});
oModel.submitChanges(
function() { /* success: do something */ },
function(oError) { /* error: do something */ }
);
oModel.remove("/YourCollection('...')", {
success: function() { /* do something */ },
error: function(oError) { /* do something */ }
});
oModel.callFunction("yourfunctionimport",
"POST", /* or PATCH or POST or GET or DELETE */
{"parameter1" : "value1" },
null,
function(oData, oResponse) { /* do something */ },
function(oError){ /* do something */ }
);
oModel.read("/your_query?firstname='John'&lastname='Doe'", {
success: function(oQueryResult) { /* do something */ }
});
var sToken = oModel.getSecurityToken();
oModel.refreshSecurityToken(function() {
window.alert('Successfully retrieved CSRF Token: '
+ oModel.oHeaders['x-csrf-token']);
}, function() {
window.alert('Error retrieving CSRF Token');
}, false);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |