Consider Order.wo of the WebOrder sample.
Change
Code:
Object oOrderHeaderDataDictionary is a cOrderHeaderDataDictionary
into
Code:
Object oOrderHeaderDataDictionary is a DataDictionary
Set Main_File to OrderHeader.File_Number
to get rid of all DD defined field settings
Then "Set pbEnabled to False" of the oOrderHeaderOrdered_By object that represents OrderHeader.Ordered_By.
Compile and you'll see all is well exept you can't get into the "Ordered by" field (which is of course also well)
Then add a button
Code:
Object oWebButton1 is a cWebButton
Procedure OnClick
String sValue
Get Field_Current_Value of oOrderHeaderDataDictionary Field OrderHeader.Ordered_By to sValue
Move (If(sValue="XX","II","XX")) to sValue
Set Field_Changed_Value of oOrderHeaderDataDictionary Field OrderHeader.Ordered_By to sValue
End_Procedure
End_Object
When you click the button the value will change.
But when you Save the order and find it again and you will see that it did not save the change.
This is expected behavior because of the new security layer.
Then I set pbNoUpdateIfHidden to False on the cWebForm but it still will now save.
This I find hard to explain.
Then I add
Code:
Procedure AllowUpdateDD Boolean ByRef bAllow
Move True to bAllow
End_Procedure
and now it works.
Is this kosher?