on 03-30-2018 3:38 PM
Hi Experts,
I am working on upgrade of an application in which oDataModel file is customized and used. CreateEntry method has been modified as below:
createEntry: function(sPath, mParameters) {
// delete expand properties = navigation properties
var oEntry = JsUtil.callSuper(ODataModel, "createEntry", this, arguments);
//Create empty values for the navigation properties
var oEntityType = this.oMetadata._getEntityTypeByPath(sPath);
if (oEntityType) {
var oObject = oEntry.getObject();
var aNavProps = this.oMetadata._getNavigationPropertyNames(oEntityType);
jQuery.each(aNavProps, function(iIndex, sNavPropName) {
//Create the list binding if not already there
oObject[sNavPropName] = {"__list": []};
});
}
return oEntry;
},
**************************************************************************************************************
oEntry.getObject() in the above code before version upgrade returns following with four arrays(these are added to oObject which is defined in createEntry method):
*******************************************************************************************************************
{OrderNumber: undefined, OrderType: undefined, OrderTypeDescription: undefined, ShortText: undefined, Plant: undefined, …}
ActivityCode:undefined
ActivityCodeGroup:undefined
ActivityDescription:undefined
ActivityType:undefined
ActivityTypeDescription:undefined
Attachments:{__list: Array(0)}
CauseCode:undefined
CauseCodeGroup:undefined
CauseDescription:undefined
CostCenter:undefined
CostCenterDescription:undefined
CreatedOn:undefined
DamageCode:undefined
DamageCodeGroup:undefined
DamageDescription:undefined
EquipmentDescription:undefined
EquipmentNumber:undefined
FunctionalLocation:undefined
FunctionalLocationDescription:undefined
IsPermitRequired:undefined
LongText:undefined
NotificationNumber:undefined
ObjectPartCode:undefined
ObjectPartCodeGroup:undefined
ObjectPartDescription:undefined
Operations:{__list: Array(0)}
OrderNumber:undefined
OrderType:undefined
OrderTypeDescription:undefined
Permits:{__list: Array(0)}
************************************************************************************
After vesion upgrade oEntry.getObject() does not have the above arrays and this disrupts the functionalities afterwards.
We have used odata.v2 model.
Any inputs would be of great help.
User | Count |
---|---|
77 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.