Skip to content

Commit

Permalink
v3.5.2 (#114)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people committed Apr 24, 2020
1 parent b6f50af commit 98a6662
Show file tree
Hide file tree
Showing 16 changed files with 189 additions and 182 deletions.
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

## Summary
Chrome Extension for Dynamics CRM Power users
Chrome Extension for Dynamics CRM/365/ Power Apps Power users

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

Expand All @@ -17,6 +17,8 @@ Action | What it does
--- | ---
**Logical Names** | Displays logical names for fields, tabs and sections.
**Clear Logical Names** | Restores the form to the original state, by removing the schema name textboxes.
**Blur Fields** | Blurs all form fields and subgrids on the form.
**Reset Blur** | Puts the form back in the default state with fields not blurred.
**God Mode** | Makes all mandatory fields optional. Makes hidden fields/tabs/sections visible. Makes read-only fields editable.
**Record Properties** | Displays information about current record like Created By, Created On, Modified By, Modified on, Permissions and Owner.
**Changed Fields** | Highlights fields in the form that have been changed, but not saved yet.
Expand All @@ -30,10 +32,6 @@ Action | What it does
**Refresh + Autosave off** | Refreshes the current form without saving it. It also turns off the auto-save after refresh.
**Toggle Tabs** | Collapses or expands the tabs in the form.
**Workflows & Business Rules** | Displays any workflows and business rules for the current entity.
**Copy Lookup** | Copies the lookup field selected on the form
**Paste Lookup** | Paste the copied lookup field
**Lookup in new window** | Opens the selected lookup in a new window/tab
**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_"
**All Fields** | Displays values for all fields not in the current form
**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.
**New record** | Displays a dialog to get the entity schemaname. Once this is given, it opens a new popup to create a new record.
Expand All @@ -51,20 +49,17 @@ Action | What it does
**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.
**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
**Instance Picker** | Displays the instance picker page (applicable to Dynamics CRM/365 Online only).
**Power Platform Admin** | Opens admin.powerplatform.microsoft.com
**Solutions History** | Display Solutions History page to see the list of solutions imported into the environment.
**New window** | Displays the current grid (Saved Query) in a new window.
**Quick Find fields** | Displays the search fields for the current entity that is displayed in the grid.
**Org Settings** | Displays some useful information about the current "Organization" you are connected to in a popup.
**Environment Details** | Displays information that can be used for support requests like TenantId, EnvironmentId, OrganizationVersion etc.
**Environment Settings** | Displays some useful information about the current "Organization" you are connected to in a popup.
**My Roles** | Displays the user roles, that you user record has.
**User & Roles** | Displays the users and their roles.
**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.
**Disable new navigation** | Disbles the new UCI/modern interface navigation.
## Functionality
Please watch this animation below for quick functionality intro.

![Levelup up extension introduction](/screenshots/Functionality%20Quick%20Intro.gif "Functionality")

## YouTube Demo (Thank you [@daryllabar](https://github.com/daryllabar))
[![YouTube Demo](/screenshots/YouTubeVideoThumbnail.jpg)](https://youtu.be/zqPGeOH1OF4 "YouTube")
## YouTube Demo (Thank you [Dynamix Academy](https://www.youtube.com/channel/UCIwcIGHhKDM0Te6R2BuZ5_g))
[![YouTube Demo](/screenshots/YouTubeVideoThumbnail.jpg)](https://www.youtube.com/watch?v=oDadS8UPxmE "YouTube")

## Build instructions

Expand Down
2 changes: 0 additions & 2 deletions app/libraries/list.min.js

This file was deleted.

10 changes: 0 additions & 10 deletions app/libraries/material.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
},
"permissions": ["activeTab", "tabs"],
"web_accessible_resources": ["/scripts/Sdk.Soap.min.js", "/scripts/levelup.extension.js"],
"version": "3.5.1",
"version": "3.5.2",
"manifest_version": 2
}
142 changes: 74 additions & 68 deletions app/pages/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,48 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Level up for Dynamics CRM/365</title>
<title>Level up for Dynamics CRM/365/Power Apps</title>
<style>
.maincontainer{
min-width: 800px;
min-height: 610px;
overflow: hidden;
}
::-webkit-scrollbar {
width: 5px;
}

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

.material-icons {
top: 5px;
left: 10px;
position: absolute;
}
::-webkit-scrollbar-track {
background-color: #fff;
;
}

body {
background: #faf9f8;
overflow: hidden!important;
}

.maincontainer {
min-width: 700px;
min-height: 450px;
overflow: hidden;
}

button {
width: 100%;
background-color: #3f51b5;
}

.material-icons {
top: 5px;
left: 10px;
position: absolute;
}

.mdl-layout__content {
padding-bottom: 15px;
}
</style>
</head>
<body>
Expand Down Expand Up @@ -82,6 +106,24 @@
Removes logical name textboxes from the form
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="blurFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">blur_on</i>
<span>Blur Fields</span>
</button>
<div class="mdl-tooltip" data-mdl-for="blurFields">
Obscures all text fields for screenshot
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="resetBlur" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">blur_off</i>
<span>Reset Blur</span>
</button>
<div class="mdl-tooltip" data-mdl-for="resetBlur">
Resets blurred fields back to initial state
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<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">
<i class="material-icons">vpn_key</i>
Expand All @@ -92,14 +134,14 @@
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="formProperties" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">apps</i>
<span>Record Properties</span>
<button data-category="Forms" id="allFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">list</i>
<span>All Fields</span>
</button>
<div class="mdl-tooltip" data-mdl-for="formProperties">
Shows legacy form properties dialog.
</div>
</div>
<div class="mdl-tooltip" data-mdl-for="allFields">
Displays values for all fields in the current record.
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="highlightDirtyFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">warning</i>
Expand Down Expand Up @@ -209,50 +251,14 @@
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="copyLookup" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">file_copy</i>
<span>Copy Lookup</span>
</button>
<div class="mdl-tooltip" data-mdl-for="copyLookup">
If the lookup field is focused, the value for this lookup is copied to the clipboard.
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="pasteLookup" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">format_paint</i>
<span>Paste Lookup</span>
</button>
<div class="mdl-tooltip" data-mdl-for="pasteLookup">
Sets the value currently focussed lookup to the clipboard value from the Copy Lookup action.
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="openLookupNewWindow" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">vertical_align_top</i>
<span>Lookup in new window</span>
</button>
<div class="mdl-tooltip" data-mdl-for="openLookupNewWindow">
Open the current lookup record in a new tab.
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="customize" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">ballot</i>
<span>Customize</span>
</button>
<div class="mdl-tooltip" data-mdl-for="customize">
Opens the Default Solution.
</div>
</div>
<div class="mdl-cell mdl-cell--4-col">
<button data-category="Forms" id="allFields" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">list</i>
<span>All Fields</span>
<button data-category="Forms" id="formProperties" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<i class="material-icons">apps</i>
<span>Record Properties</span>
</button>
<div class="mdl-tooltip" data-mdl-for="allFields">
Displays values for all fields in the current record.
</div>
</div>
<div class="mdl-tooltip" data-mdl-for="formProperties">
Shows legacy form properties dialog.
</div>
</div>
</div>
</div>
</section>
Expand Down Expand Up @@ -432,11 +438,11 @@
</section>
</main>
</div>
<script src="../scripts/options.js"></script>
</div>
<link rel="stylesheet" href="../styles/material-icons.min.css">
<link rel="stylesheet" href="../styles/material.min.css">
<script defer src="../scripts/material.min.js"></script>
</div>
<script src="../scripts/options.js"></script>
<script defer src="../scripts/material.min.js"></script>
</body>

</html>
31 changes: 28 additions & 3 deletions app/scripts/inject/levelup.common.utility.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { default as WebApiClient } from 'xrm-webapi-client';
import { IRetrieveCurrentOrganizationResponseDetail, Category } from '../interfaces/types';
import {
IRetrieveCurrentOrganizationResponseDetail,
Category,
IRetrieveCurrentOrganizationResponse,
} from '../interfaces/types';

export class Utility {
private _is2016OrGreater: boolean;
private _currentUserId: string;
private _version: string;
private _environmentDetail: IRetrieveCurrentOrganizationResponseDetail;

constructor(
private _document: Document,
private _window: Window,
private _xrm: Xrm.XrmStatic,
private _clientUrl: string,
private _environmentDetail: IRetrieveCurrentOrganizationResponseDetail
private _clientUrl: string
) {
let version = _xrm.Page.context.getVersion ? _xrm.Page.context.getVersion() : <string>window['APPLICATION_VERSION'];
this._is2016OrGreater = version.startsWith('8') || version.startsWith('9');
Expand Down Expand Up @@ -55,6 +59,13 @@ export class Utility {
return this._version;
}

public get isOnline(): boolean {
return (
(this._xrm.Page.context.isOffice365 && this._xrm.Page.context.isOffice365()) ||
(this._xrm.Page.context.isOnPremises && !this._xrm.Page.context.isOnPremises())
);
}

fetch(entityName: string, attributes?: string, filter?: string, id?: string, fetchXML?: string) {
let headers = new Headers({
Accept: 'application/json',
Expand Down Expand Up @@ -142,4 +153,18 @@ export class Utility {
document.execCommand('copy');
t.remove();
}

async retrieveEnvironmentDetails() {
// @ts-ignore
const request = WebApiClient.Requests.RetrieveCurrentOrganizationRequest.with({
urlParams: {
AccessType: `Microsoft.Dynamics.CRM.EndpointAccessType'Default'`,
},
});
try {
this._environmentDetail = (<IRetrieveCurrentOrganizationResponse>await WebApiClient.Execute(request)).Detail;
} catch (e) {
console.warn('Level up: No RetrieveCurrentOrganizationRequest');
}
}
}
Loading

0 comments on commit 98a6662

Please sign in to comment.