Friday, 19 July 2013

EP: Code to Modify the standard Title bar in EP


//set the titlebar to show the record context
 ITitleProvider titleProvider = AxBaseWebPart.GetWebpart(this) as ITitleProvider;
        try
        {
            row = this.GetCurrentRow;
            if (row != null)
            {
                titleProvider.ShowContext = false;
                //set the title----
                SalesId = row.GetFieldValue("SalesId").ToString();
                ItemId = row.GetFieldValue("ItemId").ToString();
                titleProvider.Caption = String.Format(Labels.GetLabel("@AVA1712") + ": " + SalesId + ", " + ItemId);
}
        catch (System.Exception ex)
        {
            AxExceptionCategory exceptionCategory;
            // Determine whether the exception can be handled.
            if (AxControlExceptionHandler.TryHandleException(this, ex, out exceptionCategory) == false)
            {
                // The exception was fatal and cannot be handled. Rethrow it.
                throw;
            }
        }

No comments:

How to Disable “Advanced Filter or Sort” and Enforce Custom Filters on Any D365FO Form

 In Dynamics 365 Finance and Operations, users can apply filters through the “Advanced filter or sort” feature found under the Options tab...