I've implemented the class as follows:
class NumberSeqModuleCMS extends NumberSeqApplicationModule
{
public void initializeReference(NumberSequenceReference _reference, NumberSeqDatatype _datatype, NumberSeqScope _scope)
{
super(_reference, _datatype, _scope);
switch (_datatype.parmDatatypeId())
{
case extendedTypeNum(CMSStudentId):
case extendedTypeNum(CMSCourseId):
}
}
public void loadModule()
{
NumberSeqDatatype datatype = NumberSeqDatatype::construct();
datatype.parmDatatypeId(extendedTypeNum(CMSStudentId));
datatype.parmReferenceHelp(literalStr('Student ID'));
datatype.parmWizardIsContinuous(false);
datatype.parmWizardIsManual(NoYes::No);
datatype.parmWizardIsChangeDownAllowed(NoYes::No);
datatype.parmWizardIsChangeUpAllowed(NoYes::No);
datatype.parmSortField(1);
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
this.create(datatype);
// NumberSeqDatatype datatype = NumberSeqDatatype::construct();
datatype.parmDatatypeId(extendedTypeNum(CMSCourseId));
datatype.parmReferenceHelp(literalStr('Course ID'));
datatype.parmWizardIsContinuous(false);
datatype.parmWizardIsManual(NoYes::No);
datatype.parmWizardIsChangeDownAllowed(NoYes::No);
datatype.parmWizardIsChangeUpAllowed(NoYes::No);
datatype.parmSortField(2);
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
this.create(datatype);
}
public NumberSeqModule numberSeqModule()
{
return NumberSeqModule::CMS;
}
[SubscribesTo(classStr(NumberSeqGlobal), delegateStr(NumberSeqGlobal, buildModulesMapDelegate))]
public static void NumberSeqGlobal_buildModulesMapDelegate(Map numberSeqModuleNamesMap)
{
NumberSeqGlobal::addModuleToMap(classNum(NumberSeqModuleCMS),numberSeqModuleNamesMap);
}
}
Also I've referenced this class in the form init() calling the via numberSeqPreInit() which contains the following code
void numberSeqPreInit()
{
runExecuteDirect = false;
numberSequenceModules = [NumberSeqModule::CMS];
numberSeqApplicationModule = new NumberSeqModuleCMS();
scope = NumberSeqScopeFactory::createDataAreaScope();
NumberSeqApplicationModule::createReferencesMulti(numberSequenceModules, scope);
}