Display method for table extension D365FO


A display method for table extension D365FO


As we all know there is no option to create a method in table extension and most of the time we have a requirement to create a display method.

Following are the steps.



Step-1  

Create a class Extension of the table where you can write the display method.

[ExtensionOf(tableStr(CustTable))]
final class CustTable_Extension
{
}


Step-2  

Create the display methods in the class 

public static class CustTable_Extension
{
[SysClientCacheDataMethodAttribute(true)]  
public static display Name custGroupName(CustTable _this)
{
return  CustGroup::find(_this.CustGroup).Name;
}
}



Support Faryal's Cusine


Send Email in CC AX-2012


Send Email in CC AX-2012


Most of the developer have requirement in their project to send email in CC and in default Dynamics AX-2012 & D365FO this functionality is not available.


But there is the Standard class SysEmailDistributor which is responsible to send the complete AX emails.. we can achieve our goal and send email in CC as well..


Open the class and check the process method where you can find  object of SysMailerNet class.

 SysMailerNetAddressField tos,tocc;  // declare a variable <tocc>

 mailer = new SysMailerNet();  

 tocc=mailer.ccs();   // get the SysMailerNetAddressField  object using this method

tocc.add("ShaikhSohailHussain@gmail.com");  //add email address on which you want to send email as CC.



Please feel free to contact me if you are facing any issue during implementation of this blog

Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...