Article: AN0001913Updated:
Hiding a column
This script hides column date for a new record.
Where to use this script: Class detail: Script for record detail
function OnAfterLoadColumns()
{
if ( OGDataRowId == null)
{
OGColumns.GetByCode('date').Visible = false;
}
}
Deleting values after clicking on As new one
This script deletes values from a column when creating a new record by means of button As new one. Option As new one enables us to open a page with a new record and take over into it values from the existing record. However, in certain cases we want to delete values from certain column.
Where to use this script: Class detail: Script for record detail
function OnPreRender()
{
if (OGDataDetailForm.IsModeAsNew)
{
OGColumns['__column_code__'].ColumnUI.SetData(null);
}
}