Skip to content

Commit 98a6662

Browse files
rajyramanBetimBeja
andauthored
v3.5.2 (#114)
* Double scrollbar fix * Blur fields added * scrollbar styling, blur header and subgrid * Fix #112, #113 * Remove jquery, lookup functions and customize * Bump version to 3.5.2 * Update readme. Co-authored-by: Betim Beja <11160171+BetimBeja@users.noreply.github.com> Co-authored-by: Natraj Yegnaraman <natraj@dreamingincrm.com>
1 parent b6f50af commit 98a6662

16 files changed

+189
-182
lines changed

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
## Summary
6-
Chrome Extension for Dynamics CRM Power users
6+
Chrome Extension for Dynamics CRM/365/ Power Apps Power users
77

88
![Level up screenshot](/screenshots/Levelup.png)
99

@@ -17,6 +17,8 @@ Action | What it does
1717
--- | ---
1818
**Logical Names** | Displays logical names for fields, tabs and sections.
1919
**Clear Logical Names** | Restores the form to the original state, by removing the schema name textboxes.
20+
**Blur Fields** | Blurs all form fields and subgrids on the form.
21+
**Reset Blur** | Puts the form back in the default state with fields not blurred.
2022
**God Mode** | Makes all mandatory fields optional. Makes hidden fields/tabs/sections visible. Makes read-only fields editable.
2123
**Record Properties** | Displays information about current record like Created By, Created On, Modified By, Modified on, Permissions and Owner.
2224
**Changed Fields** | Highlights fields in the form that have been changed, but not saved yet.
@@ -30,10 +32,6 @@ Action | What it does
3032
**Refresh + Autosave off** | Refreshes the current form without saving it. It also turns off the auto-save after refresh.
3133
**Toggle Tabs** | Collapses or expands the tabs in the form.
3234
**Workflows & Business Rules** | Displays any workflows and business rules for the current entity.
33-
**Copy Lookup** | Copies the lookup field selected on the form
34-
**Paste Lookup** | Paste the copied lookup field
35-
**Lookup in new window** | Opens the selected lookup in a new window/tab
36-
**Customize** | Opens the entity in the default solution. Do not use this solution to add new fields, unless you have changed the default publisher prefix, which is "new_"
3735
**All Fields** | Displays values for all fields not in the current form
3836
**Open record By Id** | Displays a dialog to get the entity schemaname and record id. Once this is given, it opens a new popup to show the record.
3937
**New record** | Displays a dialog to get the entity schemaname. Once this is given, it opens a new popup to create a new record.
@@ -51,20 +49,17 @@ Action | What it does
5149
**Perf Diag** | Displays the performance diagnostics page. Primarily useful for assessing network performance. Refer https://mbs.microsoft.com/customersource/Global/CRM/learning/documentation/user-guides/PerformanceOptimizationsCRMOnlineSuccess.
5250
**Perf Center** | Displays the performance center page. Primarily used to assess slow form performance. Can be used in conjunction with DevTools. Refer http://blog.cobalt.net/blog/understanding-the-microsoft-dynamics-crm-performance-center
5351
**Instance Picker** | Displays the instance picker page (applicable to Dynamics CRM/365 Online only).
52+
**Power Platform Admin** | Opens admin.powerplatform.microsoft.com
53+
**Solutions History** | Display Solutions History page to see the list of solutions imported into the environment.
5454
**New window** | Displays the current grid (Saved Query) in a new window.
5555
**Quick Find fields** | Displays the search fields for the current entity that is displayed in the grid.
56-
**Org Settings** | Displays some useful information about the current "Organization" you are connected to in a popup.
56+
**Environment Details** | Displays information that can be used for support requests like TenantId, EnvironmentId, OrganizationVersion etc.
57+
**Environment Settings** | Displays some useful information about the current "Organization" you are connected to in a popup.
5758
**My Roles** | Displays the user roles, that you user record has.
5859
**User & Roles** | Displays the users and their roles.
59-
**Enable new navigation** | Enable the new UCI/modern interface navigation. Refer [UI updates in October release](https://community.dynamics.com/365/b/365teamblog/archive/2018/10/01/announcing-ui-updates-in-october-for-sitemap-and-command-bar) for the official announcement.
60-
**Disable new navigation** | Disbles the new UCI/modern interface navigation.
61-
## Functionality
62-
Please watch this animation below for quick functionality intro.
6360

64-
![Levelup up extension introduction](/screenshots/Functionality%20Quick%20Intro.gif "Functionality")
65-
66-
## YouTube Demo (Thank you [@daryllabar](https://github.com/daryllabar))
67-
[![YouTube Demo](/screenshots/YouTubeVideoThumbnail.jpg)](https://youtu.be/zqPGeOH1OF4 "YouTube")
61+
## YouTube Demo (Thank you [Dynamix Academy](https://www.youtube.com/channel/UCIwcIGHhKDM0Te6R2BuZ5_g))
62+
[![YouTube Demo](/screenshots/YouTubeVideoThumbnail.jpg)](https://www.youtube.com/watch?v=oDadS8UPxmE "YouTube")
6863

6964
## Build instructions
7065

app/libraries/list.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/libraries/material.min.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
},
2727
"permissions": ["activeTab", "tabs"],
2828
"web_accessible_resources": ["/scripts/Sdk.Soap.min.js", "/scripts/levelup.extension.js"],
29-
"version": "3.5.1",
29+
"version": "3.5.2",
3030
"manifest_version": 2
3131
}

app/pages/options.html

Lines changed: 74 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,48 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8-
<title>Level up for Dynamics CRM/365</title>
8+
<title>Level up for Dynamics CRM/365/Power Apps</title>
99
<style>
10-
.maincontainer{
11-
min-width: 800px;
12-
min-height: 610px;
13-
overflow: hidden;
14-
}
10+
::-webkit-scrollbar {
11+
width: 5px;
12+
}
1513

16-
button{
17-
width: 90%;
18-
background-color: rgb(63,81,181);
19-
}
14+
::-webkit-scrollbar-thumb {
15+
border-radius: 5px;
16+
background: -webkit-gradient(linear, left top, left bottom, from(#752375), to(#3f51b5));
17+
background: -moz-linear-gradient(linear, left top, left bottom, from(#752375), to(#3f51b5));
18+
}
2019

21-
.material-icons {
22-
top: 5px;
23-
left: 10px;
24-
position: absolute;
25-
}
20+
::-webkit-scrollbar-track {
21+
background-color: #fff;
22+
;
23+
}
24+
25+
body {
26+
background: #faf9f8;
27+
overflow: hidden!important;
28+
}
29+
30+
.maincontainer {
31+
min-width: 700px;
32+
min-height: 450px;
33+
overflow: hidden;
34+
}
35+
36+
button {
37+
width: 100%;
38+
background-color: #3f51b5;
39+
}
40+
41+
.material-icons {
42+
top: 5px;
43+
left: 10px;
44+
position: absolute;
45+
}
46+
47+
.mdl-layout__content {
48+
padding-bottom: 15px;
49+
}
2650
</style>
2751
</head>
2852
<body>
@@ -82,6 +106,24 @@
82106
Removes logical name textboxes from the form
83107
</div>
84108
</div>
109+
<div class="mdl-cell mdl-cell--4-col">
110+
<button data-category="Forms" id="blurFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
111+
<i class="material-icons">blur_on</i>
112+
<span>Blur Fields</span>
113+
</button>
114+
<div class="mdl-tooltip" data-mdl-for="blurFields">
115+
Obscures all text fields for screenshot
116+
</div>
117+
</div>
118+
<div class="mdl-cell mdl-cell--4-col">
119+
<button data-category="Forms" id="resetBlur" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
120+
<i class="material-icons">blur_off</i>
121+
<span>Reset Blur</span>
122+
</button>
123+
<div class="mdl-tooltip" data-mdl-for="resetBlur">
124+
Resets blurred fields back to initial state
125+
</div>
126+
</div>
85127
<div class="mdl-cell mdl-cell--4-col">
86128
<button data-category="Forms" data-category="Forms" id="godMode" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
87129
<i class="material-icons">vpn_key</i>
@@ -92,14 +134,14 @@
92134
</div>
93135
</div>
94136
<div class="mdl-cell mdl-cell--4-col">
95-
<button data-category="Forms" id="formProperties" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
96-
<i class="material-icons">apps</i>
97-
<span>Record Properties</span>
137+
<button data-category="Forms" id="allFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
138+
<i class="material-icons">list</i>
139+
<span>All Fields</span>
98140
</button>
99-
<div class="mdl-tooltip" data-mdl-for="formProperties">
100-
Shows legacy form properties dialog.
101-
</div>
102-
</div>
141+
<div class="mdl-tooltip" data-mdl-for="allFields">
142+
Displays values for all fields in the current record.
143+
</div>
144+
</div>
103145
<div class="mdl-cell mdl-cell--4-col">
104146
<button data-category="Forms" id="highlightDirtyFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
105147
<i class="material-icons">warning</i>
@@ -209,50 +251,14 @@
209251
</div>
210252
</div>
211253
<div class="mdl-cell mdl-cell--4-col">
212-
<button data-category="Forms" id="copyLookup" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
213-
<i class="material-icons">file_copy</i>
214-
<span>Copy Lookup</span>
215-
</button>
216-
<div class="mdl-tooltip" data-mdl-for="copyLookup">
217-
If the lookup field is focused, the value for this lookup is copied to the clipboard.
218-
</div>
219-
</div>
220-
<div class="mdl-cell mdl-cell--4-col">
221-
<button data-category="Forms" id="pasteLookup" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
222-
<i class="material-icons">format_paint</i>
223-
<span>Paste Lookup</span>
224-
</button>
225-
<div class="mdl-tooltip" data-mdl-for="pasteLookup">
226-
Sets the value currently focussed lookup to the clipboard value from the Copy Lookup action.
227-
</div>
228-
</div>
229-
<div class="mdl-cell mdl-cell--4-col">
230-
<button data-category="Forms" id="openLookupNewWindow" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
231-
<i class="material-icons">vertical_align_top</i>
232-
<span>Lookup in new window</span>
233-
</button>
234-
<div class="mdl-tooltip" data-mdl-for="openLookupNewWindow">
235-
Open the current lookup record in a new tab.
236-
</div>
237-
</div>
238-
<div class="mdl-cell mdl-cell--4-col">
239-
<button data-category="Forms" id="customize" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
240-
<i class="material-icons">ballot</i>
241-
<span>Customize</span>
242-
</button>
243-
<div class="mdl-tooltip" data-mdl-for="customize">
244-
Opens the Default Solution.
245-
</div>
246-
</div>
247-
<div class="mdl-cell mdl-cell--4-col">
248-
<button data-category="Forms" id="allFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
249-
<i class="material-icons">list</i>
250-
<span>All Fields</span>
254+
<button data-category="Forms" id="formProperties" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
255+
<i class="material-icons">apps</i>
256+
<span>Record Properties</span>
251257
</button>
252-
<div class="mdl-tooltip" data-mdl-for="allFields">
253-
Displays values for all fields in the current record.
254-
</div>
255-
</div>
258+
<div class="mdl-tooltip" data-mdl-for="formProperties">
259+
Shows legacy form properties dialog.
260+
</div>
261+
</div>
256262
</div>
257263
</div>
258264
</section>
@@ -432,11 +438,11 @@
432438
</section>
433439
</main>
434440
</div>
435-
<script src="../scripts/options.js"></script>
441+
</div>
436442
<link rel="stylesheet" href="../styles/material-icons.min.css">
437443
<link rel="stylesheet" href="../styles/material.min.css">
438-
<script defer src="../scripts/material.min.js"></script>
439-
</div>
444+
<script src="../scripts/options.js"></script>
445+
<script defer src="../scripts/material.min.js"></script>
440446
</body>
441447

442448
</html>

app/scripts/inject/levelup.common.utility.ts

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import { default as WebApiClient } from 'xrm-webapi-client';
2-
import { IRetrieveCurrentOrganizationResponseDetail, Category } from '../interfaces/types';
2+
import {
3+
IRetrieveCurrentOrganizationResponseDetail,
4+
Category,
5+
IRetrieveCurrentOrganizationResponse,
6+
} from '../interfaces/types';
37

48
export class Utility {
59
private _is2016OrGreater: boolean;
610
private _currentUserId: string;
711
private _version: string;
12+
private _environmentDetail: IRetrieveCurrentOrganizationResponseDetail;
813

914
constructor(
1015
private _document: Document,
1116
private _window: Window,
1217
private _xrm: Xrm.XrmStatic,
13-
private _clientUrl: string,
14-
private _environmentDetail: IRetrieveCurrentOrganizationResponseDetail
18+
private _clientUrl: string
1519
) {
1620
let version = _xrm.Page.context.getVersion ? _xrm.Page.context.getVersion() : <string>window['APPLICATION_VERSION'];
1721
this._is2016OrGreater = version.startsWith('8') || version.startsWith('9');
@@ -55,6 +59,13 @@ export class Utility {
5559
return this._version;
5660
}
5761

62+
public get isOnline(): boolean {
63+
return (
64+
(this._xrm.Page.context.isOffice365 && this._xrm.Page.context.isOffice365()) ||
65+
(this._xrm.Page.context.isOnPremises && !this._xrm.Page.context.isOnPremises())
66+
);
67+
}
68+
5869
fetch(entityName: string, attributes?: string, filter?: string, id?: string, fetchXML?: string) {
5970
let headers = new Headers({
6071
Accept: 'application/json',
@@ -142,4 +153,18 @@ export class Utility {
142153
document.execCommand('copy');
143154
t.remove();
144155
}
156+
157+
async retrieveEnvironmentDetails() {
158+
// @ts-ignore
159+
const request = WebApiClient.Requests.RetrieveCurrentOrganizationRequest.with({
160+
urlParams: {
161+
AccessType: `Microsoft.Dynamics.CRM.EndpointAccessType'Default'`,
162+
},
163+
});
164+
try {
165+
this._environmentDetail = (<IRetrieveCurrentOrganizationResponse>await WebApiClient.Execute(request)).Detail;
166+
} catch (e) {
167+
console.warn('Level up: No RetrieveCurrentOrganizationRequest');
168+
}
169+
}
145170
}

0 commit comments

Comments
 (0)