Показать сообщение отдельно
Старый 05.12.2018, 02:27   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
alirazazaidi: Table method extension and grid field mapping Dynamics 365 for finance and operations
Источник: https://www.tech.alirazazaidi.com/ta...nd-operations/
==============

Hi all, here is small tip, I learned today, so document it



I need a custom method in table extension. And then this method need to call in field mapping inside Grid. Interesting it is amazing easy.



So like other extensions. You have to create a class add a attribute and make in static class show it will extension of certain table. And now create a method Suppose I need extension for PurchRFQScoring table


[ExtensionOf(tableStr(PurchRFQScoring))]

public static class PurchRFQScoring_Extension

{



[SysClientCacheDataMethodAttribute(true)]  //This attribute will cache your display method.

public static display Name ScoringName(PurchRFQScoring _this)

{

return PurchRFQScoringRFQCaseCriteria::find(_this.ScoringRFQCaseCriteria).name;

}



}



Now compile solution. And open the grid and from field mapping, set table In source. And in field you have to add method with class reference like


PurchRFQScoring_Extension::ScoringName





Источник: https://www.tech.alirazazaidi.com/ta...nd-operations/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.