Good afternoon,
I am looking to extend an existing method in order to add an additional field to the Job Registration screen. This method is Forms\JmgRegistration.mapPreviewFieldControlToFieldNameDelegateHandler().
The method that I am trying to extend is thus:
///
/// Delegate handler for mapping a preview field control to JmgFieldName enumerations.
///
/// The name of the control to map.
/// A collection where the mapped enumerations can be returned
[SubscribesTo(classStr(JmgRegistrationForm), delegateStr(JmgRegistrationForm, mapPreviewFieldControlToFieldNameDelegate))]
public static void mapPreviewFieldControlToFieldNameDelegateHandler(FormControlName _controlName, Set _fieldNames)
{
switch (_controlName)
{
case formControlStr(JmgRegistration,preProd_prodOrder):
_fieldNames.add(JmgFieldName::ProdOrder);
break;
case formControlStr(JmgRegistration,preProd_OprActId):
_fieldNames.add(JmgFieldName::OperationActivity);
break;
etc etc...
}
}
I have tried to extend it like so:
[ExtensionOf(classstr(JmgRegistrationForm))]
final class JmgRegistrationFormTTN07720_Extension
{
public static void mapPreviewFieldControlToFieldNameDelegateHandler(FormControlName _controlName, Set _fieldNames)
{
switch (_controlName)
{
case formControlStr(JmgRegistration,CuttingListId):
_fieldNames.add(JmgFieldName::CuttingListId);
break;
}
next mapPreviewFieldControlToFieldNameDelegateHandler(_controlName, _fieldNames);
}
}
This extension is never called.
Please can someone advise me where I am going wrong?