PDA

View Full Version : Saving a field without DEO in a webview fails



JimmyH
2-Mar-2016, 09:29 AM
Is this fixed i 18.2, or am I missing a property?

If I set field_changed_value on a field that's not in the webview, the field is blank after a save.
If I add a webform to the webview with the field and set pbrender to false, the field is saved as expected.

What do I do?

Thanks in advance
Jimmy

Samuel Pizarro
2-Mar-2016, 11:42 AM
Ouch ! really ?

Todd Forsberg
2-Mar-2016, 11:58 AM
Are you sending "Request_Save of DDO" directly after the "Set Field_Changed_Value..."?

Also, in what method/event are you doing this?

Harm Wibier
2-Mar-2016, 03:49 PM
If there is a round trip in between (you do the set field_changed_value in one UI event like an OnClick and do the save in another event) then it will not work if there is no DEO. That behavior hasn't changed in 18.2. The advised method is to add a hidden cWebForm. Note that there also a few cases where it can be solved by moving the set field_changed_value.

Clive Richmond
3-Mar-2016, 01:27 AM
Is this fixed i 18.2, or am I missing a property?

If I set field_changed_value on a field that's not in the webview, the field is blank after a save.
If I add a webform to the webview with the field and set pbrender to false, the field is saved as expected.

We've been going through a similar learning curve and Harm has explained the reason why. Makes perfect sense once the ‘penny drops’.


What do I do?

Depending what you are trying to achieve you may be able to do what you want through Field_Defaults or one of request_save's events (backout, creating, update, validate_save, attach_main_file, save_main_file).

HTH

JimmyH
9-Mar-2016, 07:50 AM
Hmm. Can't see the logic in this, but thanks for the help!