class VKCallCenterIntegrationAttribute extends SysAttribute { VKCallCenterIntegrationActivity activityId; } public void new(VKCallCenterIntegrationActivity _activityId) { super(); activityId = _activityId; } public VKCallCenterIntegrationActivity parmActivityId(VKCallCenterIntegrationActivity _activityId = activityId) { activityId = _activityId; return activityId; }construct method of the base class, which based on the enum instantiate the right class from the hierarchy:
public static VKCallCenterIntegration construct(VKCallCenterIntegrationActivity _activityId, LanguageId _languageId, container _parameters) { VKCallCenterIntegration callCenterIntegration; VKCallCenterIntegrationAttribute callCenterIntegrationAttribute; if(_activityId) { callCenterIntegrationAttribute = new VKCallCenterIntegrationAttribute(_activityId); callCenterIntegration = SysExtensionAppClassFactory::getClassFromSysAttribute(classStr(VKCallCenterIntegration), callCenterIntegrationAttribute); } if(callCenterIntegration == null) { throw error(strfmt("Unknown activity type %1", _activityId)); } callCenterIntegration.parmLanguageId(_languageId); callCenterIntegration.parmParameters(_parameters); callCenterIntegration.parmActivityId(_activityId); callCenterIntegration.init(); return callCenterIntegration; }Child classes in the hierarchy should mention attribute value:
[VKCallCenterIntegrationAttribute(VKCallCenterIntegrationActivity::ClickAndCollect)] class VKCallCenterIntegrationClickAndCollect extends VKCallCenterIntegration { }
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units and "buy me a coffee" link.
Join us.