cancel
Showing results for 
Search instead for 
Did you mean: 

createEntry method not returning Entry as expected after version upgrade from 1.28 to 1.44

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (0)