On pressing a save button I have code in a script editor to grab a field, split it up and place those parts into other fields on the XPage which are bound to fields on a form. However, getComponent("x").setValue("1") works, but the currentDocument.save() won't save those changes. If I use currentDocument.replaceItemValue("x", "1") they get saved. Why? What if the difference in how I set those fields? Is it like front-end save vs back-end save?
Asked
Active
Viewed 1,584 times
0
-
1`getComponent()` is slower and should be avoided when possible. Looks like you don't really have a problem here. – Panu Haaramo Apr 03 '13 at 10:22
-
Whent he field was set with getComponent and I then saved the doc the changes weren't saved and I wondered why. As you say, not a problem using replaceItemValue anyway. Thanks Panu. – user1753622 Apr 03 '13 at 11:20