Skip to content

Commit

Permalink
Fixes #65 - Change the tile using supported technique
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdurow committed Feb 17, 2021
1 parent bb77099 commit b5f98cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@
"Precision": 0
},
{
"Label": "Title (leave empty to hide header)",
"Label": "Dialog Title",
"Value": "",
"ColSpan": 2,
"FieldName": "title",
Expand Down
12 changes: 1 addition & 11 deletions SmartButtonsUCI/SmartButtons.ClientHooks/src/OpenDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export async function OpenDialog(
width: width ?? 420,
height: height ?? 280,
position: 1,
title: dataParameters.showHeader ? dataParameters.dialogTitle : " ",
} as Xrm.Navigation.NavigationOptions;

// Open the dialog and wait for it to close
Expand All @@ -66,17 +67,6 @@ export function AddCanvasAppIframe(): void {
const parameters = querystringify.parse(window.location.search) as { data: string };
const dataParmeters = JSON.parse(decodeURIComponent(parameters.data));

// Change the name of the dialog
if (parent && parent.document) {
if (!dataParmeters.showHeader) {
const chromeHeader = parent.document.getElementById("defaultDialogChromeHeader");
if (chromeHeader) chromeHeader.style.display = "none";
} else {
const titleElement = parent.document.getElementById("defaultDialogChromeTitle");
if (titleElement) titleElement.innerText = dataParmeters.dialogTitle;
}
}

const recordId = normaliseGuid(dataParmeters.id);
const recordLogicalName = dataParmeters.logicalName;

Expand Down

0 comments on commit b5f98cf

Please sign in to comment.