i am doing a POC for update through Web Dynpro
I have made an entity sergvice with a field as fname-short text- i create a record in it as below and save its guid in a context varialbe
AFirstOne one = FirstOneServiceProxy.create(); one.setFname("hello"); one.getAspect().sendChanges(); wdContext.currentContextElement().setKey(one.getGuid());
Now i am trying to update the same record --
AFirstOne first = FirstOneServiceProxy.read (wdContext.currentContextElement().getKey()); if (first ==null) { wdComponentAPI.getMessageManager().reportSuccess("null"); } else { wdComponentAPI.getMessageManager().reportSuccess("not null"); wdComponentAPI.getMessageManager().reportSuccess(first.getGuid()); first.setFname("bye"); first.getAspect().sendChanges(); }
The not null and guid is printed but the record is not updated inn the table
Can anyone plaes suggest me the reason for this?
What am i doing wrong ?