Skip to content

Instantly share code, notes, and snippets.

View girishuppal's full-sized avatar
💭
All about Microsoft products and services in the cloud

Girish Uppal girishuppal

💭
All about Microsoft products and services in the cloud
View GitHub Profile
@girishuppal
girishuppal / PBIDAX.md
Created October 14, 2024 04:55
DAX Functions - Power BI
Function Name Syntax Purpose
SUM
SUMX
DIVIDE
ALL
@girishuppal
girishuppal / ShowAlertMessage.js
Last active October 1, 2024 01:11
Show Form notification Alert message in model driven app using JavaScript
// Javascript to show Warning, Info or Error messages depending on boolean field status
function ShowAlertMessage(executionContext) {
var formContext = executionContext.getFormContext();
var warningId = "warningId001";
var alertWarningField = formContext.getAttribute('XXX').getValue();
var errorId = "errorId001";
@girishuppal
girishuppal / DataURI.md
Last active October 14, 2024 05:13
Data URI

Data URI

Title Code
JPG image/jpeg
PNG image/png
GIF image/gif
WEBP image/webp
HTML text/html
SVG image/svg+xml
@girishuppal
girishuppal / AllJavaScript.md
Last active October 1, 2024 01:08
All Javascript Dynamics 365
Description Link
Hide Tab based on choice field value Link
Open Web Resource Link
Hide Tab Link
Prevent Auto saving of forms Link
Remove To field value in Email Link
Disable choice option Link
Removes option from option set Link
Display Message box Link
@girishuppal
girishuppal / DynamicsJS.md
Last active October 1, 2024 01:10
Dynamics 365 JavaScript Syntax
Syntax Explanation
var formContext = executionContext.getFormContext() Gets form's execution context
var zip = formContext.getAttribute('gir_zipcode').getValue() Extracts fields value
var countryTab = formContext.ui.tabs.get('country_tab') Gets Tabs reference
countryTab.setVisible(false) Hides the tab
Xrm.Navigation.openWebResource("new_girishhome.html") Opens Web resource
var args = formContext.getEventArgs() Get event arguments
formContext.getAttribute("to").setValue(null) Set field values null
formContext.getControl("cities").removeOption(10001) Removes option from option set
@girishuppal
girishuppal / HideTabOnChoiceField.js
Created September 24, 2024 04:28
Hide Tab based on choice field value using JavaScript - Model driven app
/* Hide Tab based on value selection in Choice column field */
function HideTabBasedOnField(){
// Replace choice field name with your value
if(Xrm.Page.getAttribute("...choicefieldname... ").getValue() !=1){
// Replace tab name with your value
Xrm.Page.ui.tabs.get("...tabname...").setVisible(false);
@girishuppal
girishuppal / KBShortcut.md
Last active July 26, 2024 01:45
Keyboard Shortcuts - Important
Technology Shortcut                        Purpose
Excel Ctrl - Delete row from Table
Excel Ctrl Shift + Add row in Table
Word PowerPoint Outlook OneNote Alt Shift Up/Down Select item and seamlessly move up and down in a table content
Power Toys - Always on Top Win Ctrl T Pin a Window
Power Toys - Text Extractor Win Shift T Extracts text from Image
Power Toys - Color Picker Win Shift C Opens Color Picker
Power Toys - Mouse Highlighter Win Shift H Opens Mouse Highlighter. Click of mouse generates a visual effect on mouse pointer
@girishuppal
girishuppal / PACPCF.md
Created April 7, 2024 09:52
Create PCF components using CLI

Initialise PCF

pac pcf init --namespace XXX --name YYY --template field

Initialise Solution

pac solution init --publishername BBB --publisherprefix CCC

Run Build

npm run build

@girishuppal
girishuppal / SampleYAML.yml
Last active April 4, 2024 10:09
YAML Document
---
doe: "a deer, a female deer"
ray: "a drop of golden sun"
pi: 3.14159
xmas: true
french-hens: 3
calling-birds:
- huey
- dewey
- louie