Wednesday, December 15, 2021

Apply color theme to the D365F&O environment

 Hi, 

As per my requirement to apply a specific color to a particular environment, I found the below link which shows a quick solution to change the color theme of the environment.

https://timsaxblog.wordpress.com/2018/02/23/set-the-user-colour-theme-in-dynamics-365-for-operations/


I am just copy-pasting the full details of timsaxblog here on my blog for your quick reference.


We’re in the User acceptance test phase of our current project and now have users working in User acceptance test, Data migration, Training (and soon) Production environments.

One of the user personalisation options in Dynamics 365 for Operations is setting the colour theme for the environment – I’d prefer to have the option of setting a company colour (https://ideas.dynamics.com/ideas/dynamics-operations/ID0003297 ) but luckily in our current project we only have one company configured.

What we’re going to do here is set the user colour theme the same for all users, so that the users (and support staff) can readily identify which environment they are working in. Later on we might do this as a modification – for instance make this a menu option that a systems administrator could run, or write a script which we can run after we’ve copied data from one environment to another – but for now here’s a quick and simple way of doing this

1. Log into an environment (e.g. UAT) as a systems administrator and navigate to your Settings > User options:

The system displays:

2. Click Microsoft office > User information (unfiltered), and download and open the Excel spreadsheet:

You might need configure and or sign in to the Office Add-in. Configuring the office add-in is outside the scope of this blog (and a bit too technical for me).

3. Add the Theme column. Click Design:

Click the Pen icon next to the SystemUser Table:

Add ‘Theme’ to the select fields (Double-click it, or Select it and click Add):

Click Update:

Yes:

Done:

Refresh:

Click Yes, and note that the users’ existing Themes are now displayed.

4. Update the Theme and click Publish:

Check for success:

Close the spreadsheet.

Wednesday, December 1, 2021

How to call standard button Clicked method from customized button in D365FO

Hi Guy's,

Recently, I received one requirement where we need standard button clicked method logic to be called from customized button on the same form but in another Action Pane Tab and button group.

To achieve this requirement, I used COC of the form and retrieve the button control in variable. I easily able to call the method's define on the button.

Please check below code.

[ExtensionOf(formStr(WHSLoadTable))]
final class WHSLoadTableForm_Extension
{

[FormControlEventHandler(formControlStr(WHSLoadTable, PickList), FormControlEventType::Clicked)]
public static void PickList_OnClicked(FormControl sender, FormControlEventArgs e)
{
        FormButtonControl callerButton = sender as FormButtonControl;

                  FormRun form = callerButton.formRun();

                  FormButtonControl btnPickList = form.design(0).controlName("WHSPickListShipping") as                 FormButtonControl;

                btnPickList.clicked();

        }
}

Happy Learning !!