Hello,
I was trying make LOC_FROM and LOC_TO as required fields in VcTreMileageTable DC (package ess/tre/tre), but I didn't be successful.
I inserted this code in wdDoModifyView method:
IFieldControlNode nodeFieldControl =
(IFieldControlNode) wdThis.wdGetCustomizeController().getFieldControl();
for (int i = 0; i < nodeFieldControl.size(); i++)
{
IFieldControlElement element = nodeFieldControl.getFieldControlElementAt(i);
if (element.getFieldname().equals("LOC_FROM") || element.getFieldname().equals("LOC_TO"))
element.setRequired(true);
}
and in CustomController I had set:
startLocationField.setState(WDState.REQUIRED); endLocationField.setState(WDState.REQUIRED);
but they didn't work.
If anyone have any input on this highly appreciated.
Thanks,
Damiano