This post is part of the In Microsoft Dynamics 365 Business Central (Power Automate), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.
I’ve previously commented, in the Working with Power Automate series, that environment variables should be used and I do stand by that statement. However, it occurred to me after writing that post that, when working with Power Automate flows for Business Central, while you should use environment variables for the environment and company, there may be benefits to storing other settings in a custom table in Business Central, where you could store the parameters using a key/value pair.
This would have the benefits avoiding hard-coding settings in the flow as well as making it easier for end-users to maintain the settings.
Instead of needing to access the Power Automate portal and changing the environment variables, they could instead use the more familiar Business Portal environment to change the parameters in a list page. If I was taking this approach, I would also include more than just the key/value in order to make maintaining it easier for users, by including a way to group similar settings and include a notes column which would allow an explanation of the setting to be included for future reference.
This is a brief example of the table I might have created:
Key | Value | Group | Notes |
---|---|---|---|
Purchasing Fallback Approver | fred@example.com | Approval Workflows | Fallback purchasing approver for when everyone else is out of office. |
Sales Fallback Approver | bob@example.com | Approval Workflows | Fallback sales approver for when everyone else is out of office. |
Within the flow, the table could be selected and loaded into variables for use via the Find record (V3) action.
If you aren’t using Business Central then a similar approach could be used in SharePoint or even an Excel workbook stored on OneDrive.
In Microsoft Dynamics 365 Business Central, how do I…
Click to show/hide the In Microsoft Dynamics 365 Business Central, how do I… Series Index
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.