Skip to content

Trying to set a default value for a CCombobox field when a classic-client window first opens, by assigning the value inside the window's Load event, causes the page to render incorrectly — what's the correct way to set a client-side default value for a new record?

Answer

Override the framework's vrtDataRecordGetDefaults method instead of setting the value in the Load event — the IFS Framework specifically invokes this method to retrieve client-side default values whenever a new record is being created, and it's designed for exactly this purpose, unlike the Load event which fires at a point in the page lifecycle that isn't well-suited for setting a combo box's default selection.

← Browse Developer Studio, deployment, and upgrades questions