[ExtensionOf(classStr(SrsPrintDestinationSettings))] public final class MySrsPrintDestinationSettings_Extension { private SysEmailSystemId emailTemplateId; #define.CurrentVersion(1) #localmacro.CurrentList emailTemplateId #endmacro public SrsReportEMailDataContract parmEMailContract(SrsReportEMailDataContract _emailContract) { next parmEMailContract(_emailContract); if(!emailContract.parmBody() && emailTemplateId) { SysEmailMessageTable sysEmailMessageTable = SysEmailMessageTable::find(emailTemplateId, CompanyInfo::languageId()); emailContract.parmBody(SysEmailMessage::stringExpand(sysEmailMessageTable.Mail, SysEmailMessage::createStandardPlaceholders())); } return emailContract; } [DataMemberAttribute] public SysEmailSystemId myParmEmailTemplateId(SysEmailSystemId _emailTemplateId = emailTemplateId) { emailTemplateId = _emailTemplateId; return emailTemplateId; } public container pack() { container packedClass = next pack(); return SysPackExtensions::appendExtension(packedClass, classStr(MySrsPrintDestinationSettings_Extension), this.packMyExtension()); } public boolean unpack(container _packedClass) { boolean result = next unpack(_packedClass); if (result) { container packedClassExtension = SysPackExtensions::findExtension(_packedClass, classStr(MySrsPrintDestinationSettings_Extension)); //Also unpack the extension if (!this.unpackMyExtension(packedClassExtension)) { result = false; } } return result; } private container packMyExtension() { return [#CurrentVersion, #CurrentList]; } private boolean unpackMyExtension(container _packedClass) { Integer version; if (typeOf(conPeek(_packedClass, 1)) == Types::Integer) { version = conPeek(_packedClass, 1); } else { version = RunBase::getVersion(_packedClass); } switch (version) { case #CurrentVersion: [version, #currentList] = _packedClass; break; default: return false; } return true; } }
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.