https://blog.lkatney.com/Ghost 0.5Mon, 21 Jan 2019 21:50:36 GMT60This another post highlights features released changed specifically for development and deployment.

Development

Lightning Web Components (Generally Available)

Lightning web components are custom HTML elements built using HTML and modern JavaScript. Lightning Web Components brings the latest advancements in JavaScript and web standards to the Lightning Component framework.

Lightning Web Components uses core Web Components standards and provides only what’s necessary to perform well in all browsers supported by Salesforce. Because it’s built on code that runs natively in browsers, the Lightning Web Components programming model is lightweight and delivers exceptional performance. Most of the code you write is standard JavaScript and HTML.

Example:

Let’s look at some code. Each Lightning web component is made up of an HTML template and a JavaScript class. This component contains a base component, which is built on Lightning Data Service. The component attributes are object-api-name, record-id, and fields.

Locker Service is Now Lightning Locker

New Date-Time $Locale Attributes

The $Locale global value provider has new attributes for date-time formatting. $Locale returns information about the current user’s preferred locale.

Attribute

Description

Sample Output

longDateFormat

Long date format.

"MMMM d, yyyy"

shortDateFormat

Short date format.

"M/d/yyyy"

shortDatetimeFormat

Short date time format.

"M/d/yyyy h:mm a"

shortTimeFormat

Short time format.

"h:mm a"

Navigate to a URL with the standard__webPage Page Reference Type

The navigation service uses a PageReference object to describe pages. A new PageReference type of standard__webPage wraps a raw URL so that you can navigate to external websites.

The standard__webPage type replaces the force:navigateToURL event.

Allow External iframes of Visualforce Pages with Clickjack Protection

Use iframes to include Visualforce pages on external web pages while enabling clickjack protection. Whitelist the external domains that you trust to bring your Visualforce content outside the Salesforce domain. Previously, it was all or nothing: You could allow iframes of Visualforce pages on all external domains or none at all.

Under Clickjack Protection, select Enable clickjack protection for customer Visualforce pages either with headers disabled or with standard headers. Both these options allow framing on whitelisted external domains and provide clickjack protection. Then under Whitelisted Domains for Visualforce Inline Frames, add the trusted external domains where you allow framing.

Apex

Enforce Field-Level Security Permissions for SOQL Queries (Beta)

Use the WITH SECURITY_ENFORCED clause to enable checking for field- and object-level security permissions on SOQL SELECT queries, including subqueries and cross-object relationships. Although performing these checks was possible in earlier releases, this clause substantially reduces the verbosity and technical complexity in query operations. This feature is tailored to Apex developers who have minimal development experience with security and to applications where graceful degradation on permissions errors isn’t required.

Example

If field-level security for Website is hidden, this query throws an exception indicating insufficient permissions.

Fewer Round-Trips for the FlexiPage Object by Using SObject Collections

Using Tooling API, you now can take action on multiple records belonging to the FlexiPage object with a single request. By grouping operations by object type, you reduce the number of round-trips between the client and server. SObject Collections supports XML and JSON formats. Only the FlexiPage object is supported.

Use a GET request to retrieve one or more records of the same object type, specified by ID.

Use a DELETE request to delete to up 200 records, specified by ID, returning a list of DeleteResult objects.

/vXX.X/tooling/composite/sobjects/?ids=recordId1,recordId2

Save Time by Cloning Sandboxes (Generally Available)

Sandbox cloning simplifies the management of multiple concurrent work streams in your application life cycle. Clone an existing sandbox for each type of work, such as development, testing, and staging. As you move from one development stage to the next, clone an existing sandbox rather than using your production org as the source. This pattern simplifies the customization of individual sandboxes. Your colleagues can easily clone individual sandboxes instead of sharing one sandbox to avoid stepping on each other’s toes.

Deployment

Clone, Deploy, Upload, and Validate Change Sets with Fewer Clicks

You no longer have to load the change set’s detail page to initiate these operations. We added links to the Inbound Change Set page that you can use to initiate validation and deployment operations for both deployed and undeployed change sets. If the change set has been deleted from its source org, these operation links aren’t available. If a deployment of the change set is in progress, these operation links aren’t available until after the deployment completes. We also added links to the Outbound Change Set page that you can use to upload or clone change sets. If the change set doesn’t contain any components, the Upload link isn’t available.

]]>https://blog.lkatney.com/2019/01/15/spring19-is-here-development/0a6c0234-5ef5-4f3c-9ae4-caa44501b566Tue, 15 Jan 2019 11:16:28 GMTIn this post, I am highlighting major customization features released in Spring'19

Customizations

Einstein Next Best Action: Use Strategies to Recommend Actions and Offers (Generally Available)

Display the right recommendations, at the right moment, to the right people with Einstein Next Best Action. Integrate business rules, predictive models, and data—both inside and outside of Salesforce—to create unique strategies for all your use cases. Maybe you have offers, like discounts and upgrades, that are only relevant under specific conditions. Perhaps service agents have multiple ways to assist customers, and you want to guide the agent to the best action. Consider using Einstein Next Best Action.

Build an Action Strategy to Produce Recommended Actions and Offers

Use Strategy Builder to create a stream of actions and offers that you can display on Lightning record pages and Community pages. Strategy Builder is a point-and-click automation tool for creating strategies for Einstein Next Best Action. With Strategy Builder, you can sort, filter, and prioritize your recommendations.

Build Flows More Intuitively with Flow Builder

Your flow-building experience just got a whole lot better! Salesforce replaced Cloud Flow Designer with a much faster tool: Flow Builder. It streamlines flow building and maintenance with a simplified user interface.

With Flow Builder, Salesforce streamlined the toolbox, so it’s easier to choose the right element or resource for your flow. For example, Salesforce consolidated the data elements and how you create variables. No more keeping track of whether to use a Fast Create or Record Create, or which type of variable you need. Salesforce also renamed some elements and resources to be more intuitive. For example, the sObject data type is now called “Record.”

Respond to Salesforce Errors with Processes or Flows

Processes and flows now support standard platform events that the Salesforce Platform provides for you. Both Batch Apex Platform Event (BatchApexErrorEvent) and Platform Status Alert Event (PlatformStatusAlertEvent) capture information about errors in Salesforce. Just like with custom platform events, you can start a process or resume a flow when event messages are received for these standard platform events. Previously, the only platform events that processes and flows supported were custom ones.

Display an Image and Capture Address Information More Easily in Your Flows

Two new screen components improve your flows. Use the Display Image component to insert images in flow screens. Use the Address component to display a complete address form that’s customized to your settings

Fine-Tune Your Data Privacy Tracking with New Objects

Track data privacy preferences in more a granular way using new objects: Contact Point Type Consent, Data Use Purpose, and Data Use Legal Basis. For example, you can indicate that a customer allows contact via email but not through phone calls and mail. You can also set up categories to specify the purpose for which contact is legitimate, such as billing. And you can specify the legal basis for contacting someone against their wishes.

Create Custom Big Objects from Setup

A big object stores and manages a massive amount of data natively on the Salesforce platform. You can archive data from other objects or bring massive datasets from outside systems into a big object to get a full view of your customers. Big objects provide consistent performance, whether you have 1 million records, 100 million, or even 1 billion. Previously, creating a big object required using Metadata API. But now, if you aren’t comfortable using the API, you can create a big object in Setup, define its fields, and build the index that defines how the big object is queried.

From Setup, enter Big Objects in the Quick Find box, then select Big Objects. Click New, and the wizard guides you through the steps.

Create Objects from Spreadsheets

Now with a few clicks, you can create a custom object by importing its fields and field data from a Google sheet, a Quip spreadsheet, an .xls file, or a .csv file. Not only can you create an object and its fields quickly, but when you’re done, all its data is there, too.

Check a Field’s References Before You Edit It (Beta)

Create an Identity-First Login Page with My Domain Login Discovery

Configure My Domain with Login Discovery to simplify the login process for users. This login process is sometimes called interview-based or identity-first login. Instead of requiring users to login with a username and password, My Domain Login Discovery page prompts them to enter a unique identifier such as an email address or phone number. Then users are prompted to authenticate based on the identifier they supply. If they’re configured for SSO, they don’t even have to choose. My Domain Login Discovery sends them directly to the identity provider (IdP) login page to authenticate.

Create Your Own Verify Page for Community Sign-Ups

When users sign up for your community with an email address or phone number, Salesforce sends them a verification code and generates the Verify page. The Verify page is where users confirm their identity. Previously, you could brand the page with your logo, colors, and background, but you couldn’t change the form, which comes from Salesforce. Now you can replace the Salesforce Verify page with your own page that you create using Visualforce and a couple of Apex methods

Send Asynchronous Email Verifications

The new Salesforce Identity asynchronous email feature lets users verify their email address at any time. You send users a verification link in an email message. Users can verify their email address by clicking the link when it’s convenient. No need to stop what they’re doing. You can also customize the email message so that users recognize your brand.

In this post, I will highlight some general Spring'19 features that needs special attention and will help you out in deciding roadmap or help you build some important features for your business.

Salesforce Overall

Turn On Lightning Experience (Critical Update)

Salesforce will turn on Lightning Experience on a rolling basis starting in Winter ‘20 to empower users to move faster, do more, and be more productive. It is recommended that everyone should start preparing to transition to Lightning Experience soon so that their users can benefit from everything the new interface has to offer. This update will auto-activated. Salesforce will turn on Lightning Experience on a rolling basis starting in Winter ‘20

Lightning Experience Configuration Converter: Scan All Objects At Once

Tired of selecting which objects to scan for the latest information on JavaScript buttons and actions? Instead, get the full picture by scanning each tab for relevant metadata from all objects. Moving actions and buttons one object at a time getting you down? Move them all, for all objects, all at once!

Print a Record Page

Print key details and related lists from a record page in Lightning Experience, just as in Salesforce Classic. Specify record details visibility on the printable page and print the page from the browser. This feature is available for all users, for Account, Campaign, Case, Contact, Contract, Lead, Opportunity, Order, and custom objects.

Admins can remove the Printable View button from the record page layout in the Page Layout Editor to disable the feature.

Salesforce Surveys

Translate Your Surveys

Speak your customers’ language. Connect with your global audience by translating your surveys in more than 10 languages. Your org participants automatically view a survey in their default language. Participants outside of your org can choose from a list of languages in which the survey has been translated.

Set an Expiration Date for a Survey Invitation

Decide the exact date when you want a survey invitation to expire. You can revise the expiration date at any point of the invitation’s life cycle.

Use Thanks Badges in Lightning Experience (Pilot)

Thanks badges are now available in Lightning Experience. Let your coworkers know how much you value them with our suite of thanks badges.

See Which Objects Were Searched at a Glance

Enjoy Increased Data Storage

Data storage is increasing from 1 GB to 10 GB, giving you lots more room to grow. Orgs will begin to see the increase starting in late March 2019.

Update to Retention Limit for Field History Data

Salesforce guarantees to retain your field history data for up to 18 months through your org, and up to 24 months via the API. As announced in Winter ’19, starting in Spring ’19, Salesforce begin the process of removing field history data older than 24 months. Because of the rolling nature of mass deletes, the data might still be available for some time after Spring ’19.

This policy applies to all orgs created after June 1, 2011 who have not purchased the Field Audit Trail (FAT) add-on.

When field history data reaches the 18-month limit, Salesforce retains it for 6 more months, but the data is accessible only via Data Loader using Export All or the queryAll() API. After Salesforce deletes data, you can’t use the getDeleted() API to retrieve it.

To guarantee that you can access your field history data, purchase the FAT add-on. FAT lets you define a policy to retain archived field history data up to 10 years from the time the data was archived. To purchase FAT, contact your Salesforce Account Executive.

Lightning Dialer: Track the Result of Each Call

With one click, sales reps can track whether a call was connected and how it went. Also known as call disposition, this important information is captured in Salesforce on call logs and the activity timeline of related records.

Save Agents Time and Improve Accuracy and Completion with Einstein Case Classification

Use Einstein Case Classification to recommend or populate picklist and checkbox field values for new cases based on past data. Display those recommendations to your agents in the Service Console.

Knowledge

Get on board with Lightning Experience, and let the Lightning Knowledge Migration Tool do most of the heavy lifting to transition your Salesforce Classic knowledge base. Lightning Knowledge takes advantage of standard Salesforce components, helping you build faster and better. The Migration Tool consolidates article types into a standard Knowledge object, creates record types from previous article types, moves articles and files, and updates Feeds and Smart Links. And now you can also migrate articles owned by inactive users.

To enable the Lightning Knowledge Migration Tool in your sandbox, contact Salesforce Support. You must test and verify the migration in a full-copy sandbox before you can enable the tool in a production org.

Manage Your Articles with Lightning Experience Actions

Get more done in Lightning Experience with three new and expanded actions, Restore, Edit as Draft, and Archive. Restore archived articles or past versions in Lightning Knowledge. Previously, restoring a past version required switching to Salesforce Classic. Make last-minute changes to translations that are published or in the publication queue to keep articles in sync. Quickly declutter your knowledge base by archiving multiple articles at once from list views. And customize your knowledge base however you like—these Lightning Experience actions are available in the Salesforce APIs and with Flow.

Embed Ooyala Videos in Knowledge Articles

Lightning Knowledge authors love to create a rich article experience for their customers by embedding videos. We added ooyala.com to the list of supported domains for embedding videos in both Salesforce Classic and Lightning Experience.

Reports and Dashboards

Joined Reports Arrive in Lightning Experience (Generally Available)

With up to five blocks, joined reports let you view different types of information in a single report. Each block shows data from one standard or custom report type.

Review Data More Easily from the Run Page (Generally Available)

Updated headers in the run page (formerly called the Enhanced run page) make gaining insights from your report data faster.

Quickly Focus on Relevant Data with Conditional Formatting (Beta)

Apply conditional formatting to summary or matrix reports in Lightning Experience to lend color to your reports and gather insights at the same time.

Conditional formatting is enabled for your org by default. Open a summary or matrix report that has at least one measure or summary in edit mode. Click Conditional Formatting. In Add Conditional Formatting Rule, select a summary or custom summary formula field to apply the conditional formatting rule on. Set the breakpoint values and the range colors for each bin. When you’re ready to apply the conditional formatting rule, click Done.

Show More Data with 12-Column Dashboards

12-column dashboards give you even more control over data layout, but you can still make 9-column dashboards if you want. 12-columns or 9, dashboards created this release have rows that are half as tall as dashboards created previously. Previously created dashboards retain their original row height.

o switch between 12 and 9 columns, create or edit a dashboard. Open the dashboard properties by clicking the properties icon (Properties). From the Dashboard Grid Size section of the properties window, choose 12 columns or 9 columns.

Put More Data in Less Space with Compact Components

Compact components usher in a new era of data-dense dashboards. Any component can be a compact component, but metrics make the most sense. Dashboard editors can now add one row by one column (1x1) components to dashboards. Previously, the smallest possible component was 1 row by 2 columns.

Compact components let you group even more related metrics together.

Subscriptions: Report and Dashboard Subscriptions for Users, Groups, and Roles

Identify report and dashboard subscribers by group or role. That way, your recipient list stays current even when group membership or roles change

]]>https://blog.lkatney.com/2019/01/15/spring19-is-here-salesforce-general/5b5f35ea-0f7e-4a9d-a622-c6be9804a91aTue, 15 Jan 2019 11:16:09 GMTIn my previous post, I have provided step by step process to setup Heroku Connect with your app and Salesforce. We will use same as a base for this post and continue the solution. If you want to go to my previous post, click on button at bottom of page.

In this post, we will try to do some changes in the database from the app and sync them with Salesforce to reflect the changes there as well.

I have used NodeJS for this post to create a server and connect with Postgres to access this newly created Database. I have specifically created a wrapper to do all basic CRUD operations(CREAD, READ, UPDATE, DELETE) with this database. They are pretty clear and I am adding all the logic below.

NodeJS Code

Hope this helps!

]]>https://blog.lkatney.com/2018/08/16/crud-operations-with-heroku-connect/eef8741b-b172-41f6-b67a-2f3072194936Thu, 16 Aug 2018 07:56:42 GMTHeroku Connect is getting a lot of attention these days due to its seamless integration between Heroku and Salesforce.

Due to a drastic increase in custom apps, Heroku has emerged as an excellent PaaS(Platform as a Service) to host applications on a server specifically in case of solutions involving Salesforce.

As Heroku is a product of Salesforce itself, they invented this Heroku Connect adapter couple of years back to make integrations easy so that apps/websites can be up quickly.

Some background about Heroku

Heroku is a cloud platform as a service (PaaS) supporting several programming languages. Heroku, one of the first cloud platforms has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go. For this reason, Heroku is said to be a polyglot platform as it lets the developer build, run and scale applications in a similar manner across all the languages.

In this post, I will give you some steps to quickly set up Heroku Connect and connect your website/app with Salesforce.

Steps

Add Heroku Connect as an add-on. A free version is available for testing and development purposes.

As soon as added, Click on Heroku Connect to open configurations page.

Click on Setup Connection button which will further ask to choose your Salesforce instance along with a version with which you want to connect.

After authorization, Heroku Connect will create a database specifically for Salesforce so that it can be easily integrated. PS: Schema name is important on this page as it will derive all Postgres queries.

As a next step, you have to set up what all objects/data needs synchronization between your app and Salesforce. You can configure it on Mappings tab. Click on Create Mapping button to start making your mappings

Create mapping will show all objects available in your system. Select any one to configure fields mapping and more granular configurations.
Important things that need to be noted on this page:

Poll Frequency: What should be the frequency to sync this object

Accelerate Polling: Use this option if you need to sync changes instantly on change. This option should be enabled only if required in some scenarios.

Write Database updates: By default, Heroku connect only refreshes data from Salesforce but don't push any changes. To enable bi-directional sync, there should be a unique external Id field on an object which should be used here.

Fields: Choose whatever fields you want to sync.

Once the configuration is set, Heroku Connect will start loading data from Salesforce for that object and it can be seen on Mappings tabs itself.

Finally, if you want to check what all records are synced, you can go to Explorer tab to see all records loaded for that object.

To know about how to perform operations with this new database created by Heroku Connect, Please read my next post by clicking on button at bottom of page.

In this post, I will talk about one more useful thing that is very common to website especially blog sites that we can do with Google Analytics i.e Showing top visited pages on your website. This is simple with the Google Analytics response with list of all pages with their corresponding page views. To know more about integration with Google Analytics, please visit my previous posts.

To accomplish this, we need to do following things:

Get the response from google analytics

Re-arrange it to create a map of all pages with their title and total pageviews like below: {"/path/to/page" : { "title" : "page title", "count": 200}}

Re-order this response in descending order by reading count attribute to get most viewed/visited pages on top.

Use this response to make anchor tags with title as label, key as href on your website

Screenshot

Below is code written in NodeJS:

Happy Coding!!

]]>https://blog.lkatney.com/2018/07/29/show-top-15-pagesposts-on-website-google-analytics/ba23adaa-cf0f-40df-8ec0-a5f7ddb6061dSun, 29 Jul 2018 00:06:03 GMTIn this first post of my Offline Pro series, I will discuss creating a kind of File Picker with some advanced functionalities like:

Camera Plugin - Prerequisite

For any other framework, please use appropriate ways to add camera plugin. For this post purpose, I have added cordova-plugin-camera version 4.0.3

PS: Input file will not show camera option if camera plugin is not added to project. This is a prerequisite step if camera option is needed.

Use Input [type=file]

The purpose of using an input file is basically for two reasons:

Gives an option to browse files in file explorer

Allow selection of multiple files in a single go.

With Cordova camera plugin in markets, It is very difficult to find an appropriate plugin which allows multiple selections. This was my strong reason to use Input[type=file]

Step by step process of solution

Step 1: we should be able to select photos or take photos. For this, we need to handle onchange event on the input file. We can handle that in Angular by creating a directive and binding change event with a method like below:

Step 3: With above input element, once files are selected, they will be passed to onFilesSelection method of the controller which will perform a reading of files/images binary data. This is possible with FileReader web API. By calling readAsDataURL, we can read the binary data of files and display them accordingly with provided base64 encoded string

Step 4: Put base64 encoded string in an array to show images on UI in thumbnails. The best way to display all files is to check the extension.

If files are images, use their base64 as it is in src attribute of img tag.

If files are non-images, replace src with pre-defined images for every extension like pdf, txt etc.

Step 5: Provide a fullscreen view to show full-screen images with some standard actions on thumbnails click.

Screenshots

PS: Screenshots are taken from IOS simulator which don't support camera. This is the reason Take a photo option is not coming. This works absolutely fine on device considering camera plugin prerequisite.

Full Code - FilePicker

Hope this will help to understand the core concepts of file handling stage 1 which is reading files.

As I said in my introduction post, Please try to do hands-on and see how far you can go & extend this solution to achieve point 2 in my introduction post i.e. Save images/files locally. You can also go to my introduction post by clicking on button at bottom of this page.

Please do give your feedback if you like this post or want to improve something in solution. I will soon write another post for covering point 2 mentioned above.

Stay tuned!!

Today, I am starting this tutorial Offline Pro to give basic step to step process to handle Salesforce files on mobile specifically in offline mode. This is something I designed recently and want to share my knowledge amongst all.

In this post, I will give a basic introduction to all the steps that are needed to design this solution. To make this tutorial interactive and easy, I am breaking the full solution in multiple posts and will write them one by one.

At the end of every post, I would really recommend everyone to do some hands-on and try to find the next bit of solution. If you guys are able to find the next bit before my next post, please do comment so that we can cross check. If you guys think, the solution can be better or you need more info, please write in comments sections and we will discuss that further.

Below is the screenshot of two basic operations that we need to perform.

Screenshot

Following will be my discussion points in various posts:

Create a File Picker to enable camera(to take pictures) or to pick photos or files and preview them.

Save images/files somewhere on your device to be picked at the time of sync.

Pick images/files(from stored location) and sync with Salesforce

Delete/Archive images when not needed.

Create a File Downloader to download images on demand or automatic on sync.

Important

For the purpose of this tutorial, I have used Ionic1/Angular1 to make a hybrid app but the concepts are same. You can use any language for hands-on.

To start, please click on button at bottom of page to go to first part of it.

In this post, I am going to talk about a key feature that is very important specifically to blog websites i.e Searches. It is really important to give your readers ability to search with texts allow them to find their answers quickly.

This post is specifically for Ghost blogs, one of the complete blogging platforms in market that can help you setup your blog in minutes giving full freedom for customization as it is built on handlebars very similar to html. To know more about Ghost, please visit their website

As you guys are aware, there are N numbers of libraries that can be used to achieve search feature but for this post purpose, I will be using GhostHunter. The key reason to finalize this library is:

One of the most used library in Ghost world

Tightly coupled with Ghost blog

Easy to use and maintain

Now, there are two seperate versions for GhostHunter. One with Ghost 1.X and another one with Ghost 0.X.

With 1.X, it is pretty straight forward, GhostHunter uses Ghost APIs to get all your posts and enable search on them. you just need to enable Public API feature on your settings panel to expose your APIs for ghost hunter and it will work.

With 0.X, it is little bit tricky and that is my main reason to write this post. It is tricky because Ghost 0.X doesn't support Public APIs which makes GhostHunter implementation different as it can only look to your blog's RSS. That's right.

If you are using Ghost 0.X, there is no straight way to implement GhostHunter to look to all your posts. It can only look for RSS which only provide your top 20 - 30 posts at max.

To overcome this, you need to change one thing to make it working i.e. expose your posts with API. To do that you need to change a middleware file that checks for authentication.

Important: Keep in mind, this is the your main file which handles all authentication. Your changes should be very specific to open GET request to Post APIs.

Below are the changes that you need to do in middleware.js to expose GET request

In above code, you will see that condition (path.indexOf('v0.1/posts') = -1 || req.method ! 'GET' || scope !== 'public') only opens POST GET API and that is also specific for request sending query parameter scope=public in request. You can use this scope parameter to distingush between a request coming from GhostHunter or Ghost content section(on which all posts appears). Once you are done with all these changes, you can test your changes by hitting following url and also by removing scope parameter.

http://yourdomain/ghost/api/v0.1/posts/?limit=all&scope=public

Hope this helps! Happy Coding.

]]>https://blog.lkatney.com/2018/07/15/all-posts-search-with-ghosthunter/268a34bc-aa03-4b6e-b466-6363a587deb4Sun, 15 Jul 2018 09:18:19 GMTSummer'18 is already here with lot more lightning features and lot more other enhancements. Below is the list of all major feaures released:

Lightning

You guys must be aware that classis JavaScript buttons create lot more nuisance when they run in Lightning. To tackle this scenario and promoting Lightning, Salesforce introduced Lightning Experience Configuration Converter to simple convert these buttons into point-and-click lighting alternatives.

With just a few clicks, it scans your org for simple JavaScript buttons, converts them into point-and-click alternatives, and then deploys everything right into your org.

PS : The Lightning Experience Configuration Converter is a standalone tool that lives outside of Salesforce. We recommend that you run it in a sandbox or Developer org first, then migrate your changes to your production org.

New URL Format for Lightning Experience and the Salesforce Mobile App

The new URL format is more readable, addressing the issue of being directed to an unexpected location when accessing Lightning Experience URLs before authenticating.

Streamline Your List Views with Detailed Filters

You no longer have to switch to Salesforce Classic to use detailed list view filter criteria. Find important data in your list views with more detailed filters in Lightning Experience, and supercharge your workflow.

See Field Dependencies While Editing a Record Details Page

It’s now easy to view and update all dependent and controlling fields when editing a picklist or checkbox on a Record Details page.

Set Up Person Accounts in Lightning Experience

Set up person account page layouts, record types, and compact layouts without wasting time switching to Salesforce Classic.

Tailor Prerecorded Voicemail Messages for Different Types of Prospects

Sales reps can record multiple voicemail messages for different types of prospects, then “drop” (or send) the prerecorded messages to recipients’ voicemail boxes. Reps are no longer limited to a single voicemail drop recording. Less time leaving messages means more time selling.

Show Local Numbers When Calling Prospects

Increase the number of customers who engage with your team’s calls. Local Presence dynamically displays phone numbers with the same area code as the prospects your reps are calling, so more calls are answered. The phone numbers are dedicated to your org. When a prospective customer returns the call, Local Presence routes it to the rep who made the initial call.

Do More with Tasks from the List View

Reps can do much more with tasks now that they can see a list view. Built-in list view filters let reps find tasks quickly, columns are sortable, and reps can apply filters to narrow down what they see

Unify Contact, Lead, and User Merge Fields in Email Templates with a New Merge Language

Update Calendar Items by Dragging Them in Lightning Experience

Sales reps can quickly and easily reschedule meetings and update due dates by dragging meetings, tasks, and other time-sensitive records to new time slots. No more clicking through to record detail pages to update records on calendars. This feature supports superior accessibility options, so reps can drag items using a mouse or the Spacebar and arrow keys.

Salesforce Surveys

Tailor Survey Questions Based on Participant Responses

You no longer have to require participants to click through every survey question. Instead, use logic rules to present a participant a particular follow-up question based on the answer to a previous question. By adding logic rules, participants don’t have to wade through irrelevant questions, and you can gather more accurate data.

Copy a Survey

Copy a survey to replicate its questions and logic. When you copy a survey, it’s not associated to the original survey in the database. The copied survey gets a new survey record.

View a Contact’s Survey Invitations

When you look at a contact record, you can now see which surveys that contact has been invited to take. Previously, you couldn’t tell if a contact had been invited to take a survey. As a result, some contacts received survey invitations multiple times.

Development

Set Default Email Field Values with Apex in Lightning Experience

Increase the quality of your customer service and save your agents time with default values for case emails. You can even put logic behind those default values, like copying a manager when a case is escalated or applying a specific email template. If you already use the Apex QuickAction.QuickActionDefaultsHandler in Salesforce Classic, your code works as is, so you don’t have to rewrite it in Lightning Experience.

How to implement: Create an Apex class that uses the QuickAction.QuickActionDefaultsHandler interface. Specify your default email field values and logic in the class. Then in Setup, go to the Support Settings page. Select Enable Default Email Templates or the Default Handler for Email Action, and point to your new class.

Enable Debug Mode for Only the Users Who Need It

When debugging Lightning component JavaScript code, enable debug mode only for the users who are actively debugging to not affect the performance of Salesforce for other users of your org. Salesforce is slower when running in debug mode. Now you can debug problems that appear in your production environment without worrying that other users will complain or even notice.

Changes in Locker Service - eval() Is Now Available

The eval() function is now available in Locker Service, even when Strict CSP is enabled. This addition improves support for third-party libraries that evaluate code dynamically.

Limitation: In Locker Service, eval() always works in the global scope of the namespace. The eval() function can’t access the local variables within the scope in which it’s called. Normally, eval() has two modes of execution. When you invoke eval() directly, it works in the local scope. When you invoke it via a reference, it works in the global scope. Locker Service supports only the latter.

Style your Visualforce pages with the look of Lightning Experience when viewed in Lightning Experience or the Salesforce app. This attribute doesn’t change the styling when the page is viewed in Salesforce Classic.

To style your Visualforce page, set lightningStylesheets="true" in the tag.

Simplify Your Code with the Apex Switch Statement

Apex now provides a switch statement that tests whether an expression matches one of several values and branches accordingly.

If a query that uses the COUNT(fieldName) function contains a GROUP BY clause, only the number of resulting AggregateResult objects count toward the limit. For example, in the query in the following example, only one item per aggregated result is counted toward the limit.

Previously, all the records matched by this query counted toward the query row limit.

Clear Messages on Visualforce Pages While Testing

Use the new System.Test.clearApexPageMessages() method to clear the messages on a Visualforce page while executing Apex test methods

Opt Out of Collecting Code Coverage Information During Test Runs

Speed up Apex test runs by opting out of collecting code coverage information when you want faster feedback on pass or fail status rather than coverage data. When you opt out, no data about Apex test coverage is stored.

Use the new Tooling API object MetadataComponentDependency to view the dependency relationships between the metadata components in your org.

$CustomMetadata Global Variable

$CustomMetadata is a global variable in validation rule formulas to dynamically reference custom metadata types using the syntax $CustomMetadata.type.record.field.

Update Multiple Validation Rules with Custom Metadata Type Records

With custom metadata type records available to reference in validation rules, you don't need to hard code values. Reference the records directly within the validation rules to avoid adding the same values to each rule. The ability to reference custom metadata type records helps subscriber orgs, too. Previously, when you added a validation rule to a managed package, a subscriber could not edit it. Now you can define the logic and leave customization to a subscriber

Store Larger Debug Logs with Changed Log Limit

We increased the size limit for debug logs from 2 MB per log to 5 MB. You can store up to 250 MB of debug logs at a time. System logs are now deleted automatically after 24 hours instead of after seven days. Monitoring logs are still saved for seven days.

General

Duplicate Management: Run Duplicate Jobs on Custom Objects

Duplicate jobs aren’t just for accounts, contacts, and leads anymore. You can now run jobs on the custom objects you’ve created to support your business processes. Field-by-field comparison and merging of records aren’t supported.

Create Macros That Insert Text at Your Cursor

Previously when creating a macro, you could only replace existing text or add information before or after the text. Now you can insert text at your cursor.

Enjoy Updated File Previews in Salesforce Classic

File previews in Salesforce Classic now load faster and render beautifully on high-resolution monitors. We’re bringing the elegant file preview experience you love in Lightning Experience to Salesforce Classic. You can preview your files in full screen without downloading them. And now that the previews use HTML5, you no longer need Adobe Flash Player.

Preview Quip Documents and Sheets

Preview Quip documents and sheets just like other file type previews. Previews are available on the Files Details page, from Files Home, from the Notes and Attachments component, and when you click an attached Quip document in a Chatter feed.

Make Users’ Personal Data Unusable by Salesforce at Their Request

When users no longer want their personal data recognized in Salesforce, you can permanently scramble it with the new System.UserManagement.obfuscateUser Apex method. However, be careful using this method. When you invoke the method for that user, the data becomes anonymous, and you can never recover it.

]]>https://blog.lkatney.com/2018/07/04/summer18-is-here/0ace0286-ea00-48dd-b434-33720c3226fdWed, 04 Jul 2018 13:05:40 GMTSalesforce gives a very cool way to track your Metadata using a report in Summer'18 release. This reports tell what all things you can do with your specific metadata i.e either they are deployable or available in package etc.

Salesforce is also planning to add more channels(like Tooling API, Changeset, Apex Metadata API etc.) in this report which will be really helpful in future.

There is also a list of metadata which is not included yet. Please go through the link.

Happy Salesforce!

]]>https://blog.lkatney.com/2018/07/04/metadata-coverage-report-an-easy-way-to-track-your-schema/10ede6ab-51bc-4441-986e-4753edc4f4b7Wed, 04 Jul 2018 12:23:14 GMTIn this tutorial, I will mention step by step process to implement integration with Google Analytics or any google product through APIs.

In this example, I will specifically integrate Google Analytics with NodeJS.

Prerequisite Setup

Should have Google Analytics account

Should be added to any website to track some data and get them in APIs.

Steps to create a server key from Google

Once reporting API is enabled, create a new server key under credentails

Download this server key in JSON format file. This file looks like this.

The last step is to create a user on Analytics with server key information. Under your Admin > your property > User Management, create a new user with client_email mentioned in server key.

Once all steps are done, you are ready to implement your integration.

NodeJS Example Code for integration

Request Composer

There is a good way to create and test your request before implementing it in your actual code by using Request Composer provided by Google. You can create your actual request APIs specific to your business here and see your response results as well.

In case of any questions/concerns, please feel free to leave a comment below.

Happy Coding ;)

Related Posts

]]>https://blog.lkatney.com/2018/03/10/server-integration-with-google-analytics/01971e93-0767-4702-8d87-5b07a836d554Sat, 10 Mar 2018 23:45:06 GMTIn my previous post, I discussed the importance of analytics on websites and how it can improve insights about any product or website. To setup Google Analytics on your website, please follow step by step process mentioned in this article Adding Google Analytics To Your Website.

Today, I am going to discuss a main feature of analytics that can enhance your user experience on your websites i.e. Page Views.

Page Views are really helpful in building up confidence amongst users as it ensures them that there are people who used/recommended this or atleast viewed this page.

NOTE: To implement page views, Google Analytics is being used in this example.

Prepare your website to send specific data

By so far, you must have implemented Google Analytics to your website by pasting tracking code. To log more information specific to pages, Google ask to send more information from your website. It is very simple and easy to implement. You must have already implemented if you used my previous post to setup.

ga('send', 'pageview'); //main method to send more details

To know more about this method, you can visit Google's page
Page Tracking

How to use this data

To use reported data, You need to implement an integration that can use Google Analytics API v3 or v4. By integrating, you can do one of following things:

Reports around your traffic

Page views for specific urls/pages

User management

Sessions information and so on.

In this example, I am specifically using Google Analytics Reporting v4 and NodeJS to securly implement server-server integration so that I can hit an endpoint and get all relevant information specific to a particular page like total number of page views.

Background about using NodeJS and server-server integration

Reporting APIs work with access token and to implement that I had to use OAuth2.0 for Google. To implement a secure connection without passing credentails, this is the best way wherein you can ask for a secure key from Google in form of JSON file and then store it securly on server to run integrations in background.

There is a good way to create and test your request before implementing it in your actual code by using Request Composer provided by Google. You can create your actual request APIs specific to your business here and see your response results as well.

Use of Google APIs to get page views - Actual Code

This server method asks url in a query parameter to get more insights about it from Google. In this particular example, we are asking for number of page views.

End-to-End

Actual website will hit this new server with url(as param) to get page view count.

In case of any queries/questions regarding its implementation, please leave a comment below. Happy to assist you as much as I can.

Happy Coding!!

Related Posts

]]>https://blog.lkatney.com/2018/03/10/display-page-views-on-your-pages-google-analytics/0a744824-063d-43a7-854d-f8d1946dbeddSat, 10 Mar 2018 18:12:44 GMTEveryone knows the importance of analytics. It has become a necessity on websites specifically for blogs or new products on websites(a lot of many scenarios) to monitor the performance of brands/products/websites and gather information about how people are responding to it.

In this post, I am using Google Analytics as my analytics platform due to following reasons:

It's from Google so trustworthy.

It's free so no money problem.

Very easy to use and manageable. Don't need a big team to manage it.

Prerequisite Steps

To use Google Analytics, you need to complete following steps:

signup with Google Analytics with your personal or business Google credentials and it will

Create a property. The property will provide a unique key called Tracking Id that needs to be added to your website to start tracking. To do that, go to Admin > Create new property

Tracking Id looks like this UA-XXXXX-Y

How to add this tracking Id to your website

To add this tracking Id, google analytics create a generic code with your tracking id to be included anywhere on your website. You can find your tracking code by going into your newly created property then Tracking Info > Tracking Code. Just paste the code into your website or specific page and it will start sending your traffic details to Google. The code looks like below:

Related Posts

]]>https://blog.lkatney.com/2018/03/10/adding-google-analytics-to-your-website/c5dc97e5-ce95-4be9-878e-7cc17b692423Sat, 10 Mar 2018 17:16:40 GMTIn this post, I will talk about some basic understanding of Web Server OAuth flow that can be used to authorize Salesforce with some key points in consideration.

What is it?

It is a type of OAuth flow supported by Salesforce basically used by applications that are hosted on a secure server. To use this flow, key consideration is that the server must be able to protect the consumer secret. If you can't protect it or your building your application on devices, consider another flows to authorize Salesforce.

What is needed?

A connected app is needed in Salesforce to get consumer key & client id which is required to make requests. This app also determines what kind of access your user will get once fully authorized by Salesforce. You should always choose your kind of access for users.

Note: For sandbox instance, please use test.salesforce.com instead of login.salesforce.com

Once you hit this url, You will be redirected to Salesforce login page and will be asked to put your credentials. After you put your credentials, Salesforce will ask your permission to give access to application(application setup in terms of connected app remember?)

On "Allow", Salesforce will redirect to your callback url and will pass authorization code in url like below and this completes the step 1.