Показать сообщение отдельно
Старый 07.06.2018, 03:25   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Extensions and Edit and Display methods declaration in D365
Источник: http://alexvoy.blogspot.com/2018/06/...y-methods.html
==============

Just a short note for my current PU.

Display methods work well as instance methods from table extensions. As to edit-methods, we still need to declare them as static.


[ExtensionOf(tableStr(ProjProposalJour))]
final class avrProjProposalJourTable_ProjInvReport_Extension

static public server edit avrProjInvReportFmtDescWithBr avrEditInvReportFormatWithBR(ProjProposalJour _this, boolean _set, PrintMgmtReportFormatDescription _newReportFormat)
{
PrintMgmtReportFormatDescription newReportFormat = _newReportFormat;
PrintMgmtReportFormatDescription reportFormat;

reportFormat = ProjInvoicePrintMgmt::avrGetReportFormatWithBR(_this);
if (_set)
{
if (_this.RecId && newReportFormat && newReportFormat != reportFormat)
{
ProjInvoicePrintMgmt::avrCreateOrUpdateInvoiceWithBRPrintSettings(_this, PrintMgmtNodeType::ProjProposalJour, newReportFormat);
reportFormat = newReportFormat;
}
}
return reportFormat;
}



Do not forget to pass the table buffer as the first argument.

More detail can be found in Vania's article about news in PU11.




Источник: http://alexvoy.blogspot.com/2018/06/...y-methods.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.