Posts

Showing posts from 2019

x++ code to add hyperlink to a field in D365FO

Here is a way to provide hyperlink for field. 1.Create an Extension class to the form as below. [ExtensionOf(formStr(TestHistory))] public final class  TestHistoryForm_Extension { } 2.Copy onPostRun form eventhandler and write code as below.     [FormEventHandler(formStr(TestHistory), FormEventType::PostRun)]     public static void TestHistory_OnPostRun(xFormRun sender, FormEventArgs e)     {         FormStringControl   formCtrl = sender.design().controlName(formControlStr(TestHistory,TestHistory_Voucher));         formCtrl .registerOverrideMethod(methodStr(FormStringControl, jumpRef), methodStr(TestHistoryForm_Extension, JumpRefId), sender);     } 3.write definition for JumpRefId method public void jumpRefId(FormControl _formControl)     {         MenuFunction    menuFunction;       ...

How to add new Enum value through extension in D365FO

Here is the useful link. https://docs.microsoft.com/en-us/dynamics365/unified-operations/financials/accounts-receivable/location-relationship

Blogs for SSRS Reports Customization in D365FO

Here is the MS recommendation  to customize standard SSRS Report in D365FO. https://blogs.msdn.microsoft.com/dynamicsaxbi/2017/01/02/customizing-app-suite-reports-using-extensions/

x++ code to get derived dimensions in D365FO

 //return derived dimension value  //Input parameter1:Dimension name  //Input parameter2:Derived Dimension name  //Input parameter3:Dimension value     public str derivedDim(str _dimAttrName, str _derivedDimName,str _dimValue)     {               DimensionAttributeValueDerivedDimensions derivedDim;         DimensionAttribute          dimAttribute;         DimensionAttributeValue     dimAttriValue;         str                         derivedDimValue;         dimAttribute = DimensionAttribute::findByName(_dimAttrName);         if(dimAttribute)         {             dimAttriValue   = DimensionAttributeValue::findByDimensionAttributeAndVa...