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:

Secure API Integration in D365FO Using OAuth2 and Azure Key Vault (X++)

  Secure API Integration in D365FO Using OAuth2 and Azure Key Vault (X++) Integrating with external APIs securely is a common requirement in...