Posts

Showing posts from October, 2019

D365: Modifying check report along with the slip text

Today I came across a requirement to modify the standard check format in D365F&O. The requirement was to modify the design and also change the slip text that displays on the check report. Below are the steps for reference purpose that I followed to achieve the desired solution: STEPS: 1. Duplicated the Check_US report in my specified Model. 2. Modified the design accordingly. 3. Create the extension of the "ChequeController" class in order to call my newly created report and design, the code is as below: [ ExtensionOf ( classStr ( ChequeController ))] final class LevChequeController_LevridgeEquity_Extension {     /// <summary>     /// Determine the report menu item.     /// </summary>     /// <param name = "_chequeFormType">The check form type.</param>     /// <param name = "_bankChequeLayout">The bank cheque layout table buffer.</param>     /// <returns>The menu item name</retur

D365/ Ax2012: X++ code for custom lookup to show customer account and Name

public void lookup()         {             Query query = new Query();             QueryBuildDataSource queryBuildDataSource, qbds;             QueryBuildRange queryBuildRange;                 SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(custTable), this);                 sysTableLookup.addLookupField(fieldNum(CustTable, AccountNum));             sysTableLookup.addLookupField(fieldNum(CustTable, CustGroup));             sysTableLookup.addLookupField(fieldNum(CustTable, Party), false);             queryBuildDataSource = query.addDataSource(tableNum(CustTable));             qbds = queryBuildDataSource.addDataSource(tableNum(DirPartyTable));             qbds.joinMode(JoinMode::InnerJoin);             qbds.addLink(fieldNum(CustTable, Party), fieldNum(DirPartyTable, RecId));                 sysTableLookup.parmQuery(query);                 sysTableLookup.performFormLookup();         }

D365/ Ax2012: Custom lookup for customer account with not exist join

Custom lookup field with no exist join records dynamics Ax 2012 During customization I got requirement that in drop down or lookup shows those customer which did not have sales line. I handle this customization with the help of no exist join.  Code snippet is something like. public void lookup() { Query query = new Query(); QueryBuildDataSource queryBuildDataSource, qbds, dsView; QueryBuildRange queryBuildRange;   SysTableLookup sysTableLookup = SysTableLookup::newParameters( tableNum (CustTable), this);   sysTableLookup.addLookupField( fieldNum (CustTable, AccountNum)); sysTableLookup.addLookupField( fieldNum (CustTable, Party), false );   queryBuildDataSource = query.addDataSource( tableNum (CustTable));   qbds = queryBuildDataSource.addDataSource( tableNum (DirPartyTable)); qbds.joinMode(JoinMode::InnerJoin); qbds.addLink( fieldNum (CustTable, Party), fieldNum (DirPartyTable, RecId));   dsView =queryBuildDataSource.addDataSource( tableNum (SalesLine)); ds