hi,
I think your structure isn't filled in right.
This is how I did it:
var oZiekteDatums = [];
for (var i = 0; i < oSelectedDates.length; i++) {
var oDate = new Date(oSelectedDates[i].getStartDate());
oZiekteDatums.push({
Personeelsnummer: sPersoneelsnummer,
Ziektedatum: this._changeDateToUTC(oDate),
Action:
});
}
// Request content
// ---------------
var oSendData = {
};
"ZiekteDatumSet" is a association of "ZiekteRegsitratie" in my case:
In your case I should do the same:
Create an entity "requestDataSet" and an association "requestDataItemsSet".
than do this:
fill your deep structure which is an array:
aRequestDataItem.push(
{requestNumber:
customerId:
itemNumber:
rejectedItems:
}
aRequestDataItem.push(
{requestNumber:
customerId:
itemNumber:
rejectedItems:
}
fill in your payload:
var oRequestDataSet = {
};
"requestDataItemSet" is the name of your association!
Call your service:
oModel.create("/onApproveSet", oRequestDataSet, {success: