Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Friday, January 25, 2019

Getting the field Name in Table modified field event handler in D365

Hi,

can be achieved by args.getArgNum(1);

class XXXXCustTable_EventHandler
{
    /// <summary>
    ///
    /// </summary>
    /// <param name="args"></param>
    [PostHandlerFor(tableStr(CustTable), tableMethodStr(CustTable, modifiedField))]
    public static void CustTable_Post_modifiedField(XppPrePostArgs args)
    {
        CustTable               custTable   =  args.getThis() as CustTable;

        switch (args.getArgNum(1))
        {
            case fieldNum(custTable, CustGroup):
                if(!CustTable.OverrideSpecialMarginCode)
                {
                    custTable.SpecialMarginCode = CustGroup::find(
                                  custTable.CustGroup).SpecialMarginCode;
                }
                break;
        }
    }

}
Thanks,

Wednesday, January 23, 2019

ERROR: Abnormal termination with unhandled exception. in D365


Hi,

Please restart the IIS to fix this error.

Solution:
Using CMD  prompt, run as administrator and issreset.


Thanks,

Monday, January 21, 2019

Table browser job in D365


Hi,

This is not similar to AX 2012, we needs to invoke it like how we are opening the table browser.

1. Select the table name,
2. Call the below URL with your instance URL and table name.

https://<instanceURL>/?mi=SysTableBrowser&tableName=YYYNumberSeqLoad&cmp=YYY

https://URL/?mi=SysTableBrowser&tableName=PdsApprovedVendorList&cmpECOP&cmp=ECOP

Regards


Friday, January 18, 2019

String text case handlings in D365

Hi,

str2Capital  Convert the very first letter to caps.

str2Capital("the greater chennai")
The greater chennai.


str2CapitalWord  Convert all the first letter of the words to caps   

str2CapitalWord("the greater chennai")
The Greater Chennai.

Regards,

Wednesday, January 16, 2019

Filename handling in X++

Hi,

Check the file existance,
System.IO.File::Exists(fileName)

Copy the file A to B
System.IO.File::Copy(fileName, FileB);

Delete the file
System.IO.File::Delete(fileName);

Get only file name from the path URL.

System.IO.Path::GetFileName(fileName);
System.IO.Path::GetFileNameWithoutExtension();
System.IO.Path::GetExtension(fileName);

Regards,

Dimension Lookup for both standard and Custom dimension in D365

Hi,  /// <summary>     /// Provides the look-up interaction for the individual dimension value lookup controls.     /// </summary&g...