Skip to Content
0

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

Mar 30 at 02:38 PM

21

avatar image

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.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers