Avatar

Level 3

Hi everyone,

I am trying to rename a js property (within the view object) and would like to replace the view-object with a new edited object, but I am struggling.

var offerToEdit = NLWS.nmsOffer.load(offer.@id); //loads the specified offer fine
offerToEdit.view = updatedViewObjectWithAnEditedPropertyName // does not work
delete offerToEdit.view //does not work
offerToEdit["view"] = "" //does not work
offerToEdit.view = 'test' //does not work
offerToEdit.view = '{"test":""}' //does not work
offerToEdit.view = '<view/>' //does not work
offerToEdit["view"] = '<view/>' //does not work
offerToEdit.view.shortContent_jst = 'New title'; //works fine

Is it only possible to edit the values of a property or am I doing something wrong here? Any workaround?