Lightning Examples

How to use force:hasRecordId
Uncaught Action failed: c:OptyCloseLi$controller$handleOnload [Cannot read property 'record' of undefined]
http://peterknolle.com/lightning-record-edit-form/
https://developer.salesforce.com/blogs/developer-relations/2015/11/building-context-aware-lightning-components.html

Build Flexible Apps with Lightning Components


Definitions

What is IBM Campaign & Leads (Unica)?
With IBM Campaign and Leads (formerly Unica), you can design, execute, and measure campaigns across all of your channels, and generate leads and convert them into loyal customers. The IBM® Lead Management solution is a complete set of capabilities for generating leads and converting them into loyal customers. When leads are not well managed, efficiency of sales decreases and the cost of marketing increases. The gap between sales and marketing can get even wider, resulting in a loss of productivity and an inability to achieve critical objectives.

What do I need to know about ETL?
Data must be properly formatted and normalized in order to be loaded into these types of data storage systems, and ETL is used as shorthand to describe the three stages of preparing data. ETL also describes the commercial software category that automates the three processes.

What does ETL accomplish?
The three words in Extract Transform Load each describe a process in the moving of data from its source to a formal data storage system (most often a data warehouse).

Extract—The extraction process is the first phase of ETL, in which data is collected from one or more data sources and held in temporary storage where the subsequent two phases can be executed. During extraction, validation rules are applied to test whether data has expected values essential to the data warehouse. Data that fails the validation is rejected and further processed to discover why it failed validation and remediate if possible.
Transform—In the transformation phase, the data is processed to make values and structure consistent across all data. Typical transformations include things like date formatting, resorting rows or columns of data, joining data from two values into one, or, conversely, splitting data from one value into two. The goal of transformation is to make all the data conform to a uniform schema.
Load—The load phase moves the transformed data into the permanent, target database. Once loaded, the ETL process is complete, although in many organizations ETL is performed regularly in order to keep the data warehouse updated with the latest data.
Why do you need ETL?
When creating a data warehouse, it is common for data from disparate sources to be brought together in one place so that it can be analyzed for patterns and insights. It would be great if data from all these sources had a compatible schema from the outset, but this is rarely the case. ETL takes data that is heterogeneous and makes it homogeneous. Without ETL it would be impossible to programmatically analyze heterogeneous data and derive business intelligence from it.

Enterprise Data Warehouse
Advantages of Implementing an Enterprise Data Warehouse
 Enterprise Data Warehouse software & solutions
Enterprise data warehouses (EDW) have been around for 30 years and have become known as an essential part of any business intelligence operation. As such, having an enterprise data warehouse can make a real difference in the overall success of your business. Essentially, the enterprise data warehouse is a database that stores all information associated with your organization. The warehouse makes that data available to all authorized users, while also offering support in the form of in-depth analysis and detailed, accessible reporting. These warehouses may vary from organization to organization, but they generally share a number of basic capabilities:
What Makes This Advantageous?
Having access to an effective enterprise data warehouse provides a number of significant benefits. These advantages range from simple, house-keeping issues, to ones that have a significant impact on the success of the company as a whole. Here are some of the most-impactful advantages offered by data warehouses:

Data warehouses offer added support for data, in that they are designed to track, manage, and analyze information, in order to provide a more-actionable resource.
EDW’s work hand-in-hand with other analytics programs to promote company growth. In fact, about 37% of businesses state that data analytics processes facilitate growth in the business.

They provide context, and demonstrate the relationships between individual data points. This allows for better understanding of what the information means, and how it can be put to use.
Data Warehouses are capable of tracking and modifying marketing campaigns, for faster, more accurate evaluation of campaign effectiveness.
It allows users to store as much data as needed with regards to a large variety of parameters. That data can be drawn from multiple, often-unrelated sources.
EDW’s refine data, eliminating useless excess or redundant information, and improving overall data quality.
Gives the user the ability to examine information within the platform itself. This keeps data manipulation to a minimum and integrity at its highest level. Allowing decisions to be made with the most accurate data possible.
Taken all together, these advantages have been known to reduce cost associated with data analytics, and to increase company ROIs. And given that data-related problems cost the majority of companies more than $5 million annually, this is one advantage that is particularly difficult to overlook.

However, creating an effective data warehouse can be a difficult prospect. In order to use a CRM platform to build an enterprise data warehouse, you’ll need strong basic architecture.
Implementing an Enterprise Data Warehouse Solution
There are a several software providers that offer enterprise data warehouse architecture solutions, but for something that fits perfectly with your existing systems and processes, you’ll be better off building your own. This is not nearly as daunting a prospect as it might appear. By starting with a reliable CRM platform, users can effectively design a working data warehouse that is completely compatible with their organizations, and that is on par with anything being offered on the market. This link gives a detailed account on how to do so.

Understanding the concept behind the data warehouse goes hand in hand with understanding the needs of your business. So, before you commit to any specific data warehouse solution—or build your own—do your research. Identify your goals and your data needs, and take a close look at cases detailing the use of this particular tool. After all, with all of the advantages offered by implementing an enterprise data warehouse, it only makes sense to do it right.

Machine Learning (ML)

When we talk about machine learning, we’re referring to a specific technique that allows a computer to “learn” from examples without having been explicitly programmed with step-by-step instructions. Currently, machine learning algorithms are geared toward answering a single type of question well. For that reason, machine learning algorithms are at the forefront of efforts to diagnose diseases, predict stock market trends, and recommend music.

Artificial Intelligence (AI)

Artificial intelligence is an umbrella term that refers to efforts to teach computers to perform complex tasks and behave in ways that give the appearance of human agency. Often they do this work by taking cues from the environment they’re embedded in. AI includes everything from robots who play chess to chatbots that can respond to customer support questions to self-driving cars that can intelligently navigate real-world traffic.

AI can be composed of algorithms. An algorithm is a process or set of rules that a computer can execute. AI algorithms can learn from data. They can recognize patterns from the data provided to generate rules or guidelines to follow. Examples of data include historical inputs and outputs (for example, input: all email; output: which emails are spam) or mappings of A to B (for example, a word in English mapped to its equivalent in Spanish). When you have trained an algorithm with training data, you have a model. The data used to train a model is called a training dataset. The data used to test how well a model is performing is call test dataset. Both training datasets and test datasets consist of data with input and expected output. You should evaluate a model with a different but equivalent set of data, the test dataset, to test if it is actually doing what you intended.

Why We’re Bringing Voice to CRM

https://www.salesforce.com/blog/2019/11/voice-AI-future-of-business?d=cta-li-promo-171

Salesforce and Amazon Web Services (AWS) Expand Global Strategic Partnership

https://www.salesforce.com/company/news-press/press-releases/2019/11/191911-Salesforce-AWS/?d=cta-li-promo-170


“Hey Einstein”— Salesforce Brings Voice to Every Customer Experience
https://www.salesforce.com/company/news-press/press-releases/2019/11/Salesforce-Einstein-Voice/

Good Java Script Stuff @2ality – JavaScript and more
https://derickbailey.com/email-courses/

What Is a Scratch Org?

Much of the setup you do for Salesforce DX enables you to use a new type of org called a scratch org. A scratch org is a dedicated, configurable, and short-term Salesforce environment that you can quickly spin up when starting a new project, a new feature branch, or a feature test.

What Is a Developer Hub Org?

Developer Hub (Dev Hub) is the main Salesforce org that you and your team use to create and manage your scratch orgs. 


Lightning Insight

cma-intrinsics
ECMA Script
• Features built into JavaScript (“intrinsic” features)
• Published, supported features built into the Aura Components programming model.
• Published, supported features built into Lightning Locker SecureObject objects

• ECMAScript specification
• Annex B: Additional ECMAScript Features for Web Browsers
• Intrinsic Objects (JavaScript)

force:lightning:lint ==> to scan code on bundle for java script & aura comps

Lightning App Builder, Community Builder, or
Flow Builder
Lightning Component Actions
Lightning component actions are custom actions that invoke a Lightning component. They support
Apex and JavaScript and provide a secure way to build client-side custom functionality. Lightning
component actions are supported only in the Salesforce mobile app and Lightning Experience.

Configure Components for Record-Specific Actions
Add the force:hasRecordId interface to an Aura component to enable the component to be assigned the ID of the current
record. The current record ID is useful if the component is used on a Lightning record page, as an object-specific custom action or
action override in Lightning Experience or the Salesforce app, and so on.
how to get user detail in lightning component==>
Use $A.get() to retrieve static labels in JavaScript code.
e.force:showToast

18072019
circleCLI:
codacy

29072019
Lightning Use Cases:

  1. Convert Java Script button logic to lightning component via quick action.
  2. Standard button override - lightning component 

    Override a Standard Action with a Lightning Component

Navigate to a Record’s Create Page with Default Field Values


https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_general_lex_navigate_to_record_dfv.htm



Salesforce Visual Studio Code Installation Steps

PreSteps:
Install Latest JDK
Install Microsoft Visual Studio
https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model


Prerequisites

Before you set up Salesforce Extensions for VS Code, make sure that you have these essentials.

Salesforce CLI
Before you use Salesforce Extensions for VS Code, set up Salesforce CLI.

A Salesforce DX project Open your Salesforce DX project in a directory that contains an sfdx-project.json file. Otherwise, some features don’t work.
If you don't already have a Salesforce DX project, create one with the SFDX: Create Project command (for development against scratch orgs) or the SFDX: Create Project with Manifest command (for development against sandboxes or DE orgs). Or, see create a Salesforce DX project for information about setting up a project using Salesforce CLI.

Java Platform, Standard Edition Development Kit
Some features in Salesforce Extensions for VS Code depend upon the Java Platform, Standard Edition Development Kit (JDK). You need to have either version 8 or version 11 of the JDK installed.

If you don’t already have version 8 or 11 of the JDK installed, you can install the latest version of the Java 8 JDK from Java SE Development Kit 8 Downloads or the latest version of the Java 11 JDK from Java SE Development Kit 11 Downloads.

If you also use other versions of the JDK, set your VS Code user setting salesforcedx-vscode-apex.java.home to point to the location where you installed Java 8 or 11.

Visual Studio Code v1.26 or later

Documentation

For documentation, visit the Salesforce Extensions for Visual Studio Code documentation site.

Prettier formatted for Visual Studio Code

VS Code package to format your JavaScript / TypeScript / CSS using Prettier.

Installation
Install through VS Code extensions. Search for Prettier - Code formatter

Visual Studio Code Market Place: Prettier - Code formatter

Can also be installed in VS Code: Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install esbenp.prettier-vscode
⚠ A word of warning-if you have any other code formatting extensions installed such as for example hugely popular HookyQR.beautify or taichi.react-beautify they might take precedence and format your code instead of Prettier leading to unexpected results.

Usage
Using Command Palette (CMD/CTRL + Shift + P)
1. CMD + Shift + P -> Format Document
OR
1. Select the text you want to Prettify
2. CMD + Shift + P -> Format Selection

Weekend Learnings 28072019

MindValley, Inpired speeches from Great people https://www.mindvalley.com/quests/extraordinary-by-design VSCode setup: Basic Trial: To...