How to return value in Deligate and Event handler methods.
class TestPrintMgmtDelegateHandler
{
///
///
///
/// /// [SubscribesTo(classStr(PrintMgmtDocType), delegateStr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
{
if (_result.result() != null)
return;
_result.result(VCPrintMgmtDelegateHandler::getDefaultReportFormat(_docType));
}
///
///
///
private static PrintMgmtReportFormatName getDefaultReportFormat(PrintMgmtDocumentType _docType)
{
#ISOCountryRegionCodes
switch(_docType)
{
case PrintMgmtDocumentType::SalesOrderInvoice:
if(SysCountryRegionCode::isLegalEntityInCountryRegion([#isoTH]))
{
return ssrsReportStr(VCDeliveryReport, Report);
}
}
return ssrsReportStr(SalesInvoice, Report);;
}
}
No comments:
Post a Comment
Give me the commetns and solutions