-
Notifications
You must be signed in to change notification settings - Fork 16
pacx webresources setEnvImage
Sets the image that will be shown in the top left corner of the title bar. This setting applies for all MDAs of a given environment.
pacx webresources setLogo
pacx webresources setOrgImage
pacx wr setEnvImage
pacx wr setLogo
pacx wr setOrgImageThis command updates the modern CustomThemeDefinition setting and the related theme webresource logo node as described here.
The command performs the following steps:
- Connects to the current Dataverse environment.
- Retrieves and validates the specified logo webresource (must be PNG, JPG, or GIF).
- If
--appIdor--appNameis provided, resolves the target app context. - Reads the current
CustomThemeDefinitionsetting value (app-level or org-level). - Creates or updates the theme webresource with the new logo reference.
- Publishes the updated theme webresource.
The --color parameter specifies the base palette color for the theme header.
It is REQUIRED when creating a new theme for the first time. Without it, the theme XML will be incomplete and the logo will not display in the UI.
When updating an existing theme, --color is optional. If omitted, the existing color is preserved. If provided, it overrides the current value.
No CustomThemeDefinition setting is configured yet. The command creates a new theme webresource, adds it to the specified solution (or the default solution), and saves the setting.
--color is mandatory in this case.
pacx webresources setEnvImage -n new_logo.png --color '#0078D4' --solution MySolutionYou have a local theme.xml file that you want to use as the base. The command reads the local file, updates the logo reference, creates the webresource, and saves both remotely and locally.
If the local file already contains a basePaletteColor, --color is optional. Otherwise, it is required.
pacx webresources setEnvImage -n new_logo.png --localThemeFile .\new_\themes\theme.xml --solution MySolutionThe CustomThemeDefinition setting already points to a theme webresource on the server. The command retrieves the existing theme, updates the logo reference, and publishes.
--color is optional and will override the existing color only if provided.
pacx webresources setEnvImage -n new_logo.pngThe theme already exists remotely. You want to update the logo and also save the updated theme XML to a local file for version control.
pacx webresources setEnvImage -n new_logo.png --localThemeFile .\new_\themes\theme.xmlUse --appId or --appName to set the logo for a specific Model-Driven App rather than the entire environment.
pacx webresources setEnvImage -n new_logo.png --appName SalesHub --color "#107C10"
pacx webresources setEnvImage -n new_logo.png --appId 00000000-0000-0000-0000-000000000000If the CustomThemeDefinition setting points to a webresource that no longer exists (e.g., deleted manually), the command will fail with an error. In this case, you must either recreate the webresource manually or clear the setting and re-run the command as a first-time setup.
| Setting exists | Theme WR exists | Local file |
--color required |
Behavior |
|---|---|---|---|---|
| No | No | No | Yes | Creates new theme and setting |
| No | No | Yes | Depends on file | Reads local file, creates WR and setting |
| Yes | Yes | No | No | Updates remote theme |
| Yes | Yes | Yes | No | Updates remote and saves to local |
| Yes | No | - | - | Error: WR not found |
# First-time setup at environment level with a blue theme
pacx webresources setEnvImage -n new_logo.png --color "#0078D4" --solution MySolution
# Update existing theme with a new logo (no color change)
pacx webresources setEnvImage -n new_logo_v2.png
# Update existing theme and change color
pacx webresources setEnvImage -n new_logo.png --color '#E74C3C'
# Set logo for a specific app by name
pacx webresources setEnvImage -n new_logo.png --appName SalesHub --color '#107C10'
# Use a local theme file as base
pacx webresources setEnvImage -n new_logo.png --localThemeFile .\new_\themes\theme.xml --solution MySolution| Long Name | Short Name | Required? | Description | Default value | Valid values |
|---|