TrailheaDX India'19 and Spring'20 highlights!

TrailheaDX - Salesforce's annual developer conference was held for the first time in India on 19th and 20th December 2019 in Bengaluru. The event was attended by more than 3500 developers, admins, architects, partners, entrepreneurs, enthusiasts and students from all parts of India and the world. With more than 100 technical sessions, keynotes, demos and hands-on workshops (and partying!), the event was a great fun and learning experience with lot of key takeaways for everyone.

Highlights from TrailheaDX India'19


  • Lightning Platform is now called Customer 360 Platform! Yes, yet another name change for the platform, from Force.com platform to Lightning platform to Customer 360 platform. The name reflects the capabilities and offerings of the platform that allows everyone to build custom apps to extend Salesforce, putting the customer at the center of the business transformation.
  • Official recordings of the Opening Keynote, Building Modern Apps on the Customer 360 Platform Keynote, AI Journey with Einstein Keynote, Mulesoft APIs Keynote, Blockchain Keynote, and AppExchange Keynote are available on YouTube in this playlist.
  • The Opening keynote focused on three core aspects with which you can achieve continuous innovation on the Customer 360 Platform: Build, Connect and Manage. And there is a trailmix for each! Go through each of the below trailmixes to understand what's new on the platform in each of these areas:
  • A lot of innovation is being delivered around Flows. You can now schedule auto-launched flows to run at a specified time interval, configure conditional visibility on screen elements, use LWC in Flows, etc. (Winter'20 had all these cool new Flow features rolled out, and Spring'20 is bringing a lot more great additions to flows)
  • Lightning Full Sandbox - Currently in Pilot, this is a new type of Sandbox that lets you rapidly mirror your entire production environment within minutes and can be refreshed on demand! 
  • Salesforce Data Mask - anonymizes and deletes private data from your sandbox environments and replaces with substitute data in order to keep customers' data private and confidential.
  • Salesforce Evergreen - allows you to build server-less functions and microservices in languages like Node,js, Java, and Apex.
  • New Salesforce Mobile app with Einstein Voice Assistant
  • Local Development for LWC is in Beta. Lets you build, run and test Lightning Web Components locally without having to deploy to the org.
  • Source Tracking for sandboxes! Currently in Pilot, it is a potential game-changer for developers who can now build sandbox changes against source control (This was only possible with a scratch org until now). So you should be able to run sfdx force:source:status on a sandbox org as well, to track differences between your local file system / source control repo and the sandbox.

Some pictures and presentation slides from the event

(Click on the arrows for scrolling or play the slideshow)


Spring'20 Release Highlights

There are a lot of great new features being rolled out in the upcoming Salesforce Spring'20 release. As always with any release there are quite a lot of updates and new changes, and for the entire changelog the release notes can be found at https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/salesforce_release_notes.htm

Below are some of the key items from this release that are noteworthy:

  • Daily API request limit has been increased from 15,000 to 100,000 API calls!
  • All active Mobile app users will be upgraded to the new Salesforce Mobile app which is a major upgrade with lot of search and navigation improvements.
  • Permission Set Groups are now GA (It was a Beta feature in last release). Permission Set groups enable you to bundle permission sets together based on job role.
  • Muting Permission Sets are now GA. Also a Beta feature in the last release, a Muting Permission Set is used to mute certain permission set within a permission set group.
  • App Launcher got a nice face-lift! There is now a search bar and frequently used apps are visible right away.
  • Einstein Voice Assistant is in Beta. Lets users make updates to Salesforce using voice.
  • Automatically mask critical customer data in Sandboxes using Salesforce Data Mask.
  • You can now setup queues to assign Tasks to Queues to enable sales reps to share workload. 
  • Flows have once again received a major feature upgrade! 
    • Flows can now run in System Mode
    • Flows can be triggered during a 'before-save' update of a record (this offers huge performance benefits)
    • Invocable Actions now support generic sObject and List<sObject> data types 
    • You no longer need to manually store individual field values from Get Record element. The fields are accessible directly via the API name of the Get Record element. Same is the case with Create Record.
  • The @track decorator is no longer required for Lightning Web Components! All properties are reactive by default. However there is still a use case for @track decorator: read the details here.


Continue Reading →

Typical Salesforce DX Development workflow

Here is a blog post by David Ryan that provides the high level steps of development using Salesforce DX by pulling metadata from your existing developer or sandbox org, converting it to SFDX format, integrating with source control, and then deploying the changes back to your org.

https://medium.com/@djrzo4/salesforcedx-123cc383a27e


Getting Started with Salesforce DX:

Here is a five-part blog series on Getting Started with Salesforce DX written by Zayne Turner.

https://developer.salesforce.com/blogs/2018/02/getting-started-salesforce-dx-part-1-5.html


Working with Modular Development and Unlocked Packages

Here is a four-part blog series on working with Modular Development and Unlocked Packages written by Zayne Turner.

https://developer.salesforce.com/blogs/2018/06/working-with-modular-development-and-unlocked-packages-part-1.html
Continue Reading →

Changing Field Type in Salesforce

You can change the Field Type of custom fields that you create in Salesforce. Although it is a good practice to have well defined fields and field types during the design of your application, there is a good chance that you might have to change an existing custom field’s type well after the application has been in production. 

In Lightning Experience, the type of a custom field can be changed from Setup - Object Manager - Fields & Relationships - select the field and click Edit - click Change Field Type button. This article provides few key things to consider while changing custom field types.

First off: What cannot be done?

  • If you encrypt a custom field using Shield Platform Encryption, you can’t change the field type.
  • This should be obvious, but formula fields cannot be converted to any other data type, and also any other field type cannot be converted into a formula field.
  • After you have created a roll-up summary field on an object, you cannot convert the object's master-detail relationship into a lookup relationship. In other words, you can convert a master-detail relationship field created on a child/detail object into a lookup relationship, as long as there are no roll-up summary fields on the master object summarizing this child/detail object.
  • You cannot convert a lookup relationship to a master detail relationship if there are any existing records on the object that have a null value set for the lookup relationship. In other words, you can convert a lookup relationship to a master-detail relationship only if the lookup field contains a value in all the records.

What happens to the data?

There is a risk of losing existing data if you change the type of a field. Conversion to Text from certain field types might retain the data but lose the formatting in the UI. For example a Number field displaying the data in the UI as 100,000 (formatted with comma separating the thousands) when converted to Text type would just show the data as 100000. In cases where the type change would result in data loss, Salesforce displays a warning message similar to the below.

Below table lists some points to note during various type conversion scenarios.

Field Type
Changing to Type
Behavior
Number
Currency
Email
Percent
Phone
URL
Text
 - Data is Retained
 - Any specific formatting of the data in the UI is lost.
Auto Number
Picklist
Text
Data is Retained
Text
Auto Number
Data is Retained
Picklist
Multi-select Picklist
- List of Picklist values (metadata) are retained. Admin can add/modify the picklist values.
- Data in the field is retained and the value remains selected. Users can select more values.
- Any inactive picklist values are lost. (Both metadata and field data)
In addition, any compatible field type changes like converting from Number to Currency (and vice-versa) would retain the existing data provided the field lengths are identical.

Additional Restrictions and Considerations

You cannot change the type of a custom field which is referenced elsewhere by other items in Setup. For example, below error is shown when trying to change the type of a field being referenced by Validation Rules and Lookup Filters.


Below error is shown when changing the type of a field referenced in Flows or Process Builder. Note that Processes are also referred to as 'Flow' in the error message so be sure to check your Processes as well as Flows for the field reference.


These errors are displayed immediately upon selecting the field type. There are some other restrictions that get fired at the end of the field type modification process, and Salesforce shows error at the last step. For example, below error is shown when trying to change the type of a field being referenced in a Field Update.


Below error is shown if the field is being referenced in an Apex class or trigger.


Also, you can’t change the data type of any custom field that is mapped for Lead Conversion. The field type update process will fail at the last step. However, as of Winter' 19, the error message does not clearly tell why the field type update has failed when the field is being mapped for lead conversion. The reason is shown blank as below.


If you change the data type of a custom field that is set as an External ID, choosing a data type other than text, number, or email causes the field to no longer act as an External ID. This is because External ID fields must be text, number or email fields.

Invalid Conversions

Certain invalid type conversions like converting from Phone to Email might not throw any error during the conversion process, and also the data is not lost. However Salesforce throws validation error the next time the record is saved. For example, a Phone number field has the data +12125553490 and you changed the data type of this field to Email. The existing data is not lost, however when the record is subsequently edited, it throws an error as below while saving the record.

Changing custom Picklist field to Checkbox:

For a Picklist field, if you select Checkbox as the new data type, you can choose which picklist values to map to checked boxes and unchecked boxes. For example, you can convert a picklist field 'Broker Type' into a checkbox that displays whether the Broker is licensed or not based on the existing data in the picklist field. The wizard displays options for Picklist Value Conversion as below.


Changing Rich Text Area to Long Text Area:

You can only convert rich text area fields into long text area fields. Any images are deleted the next time the long text area field is saved. As long text areas do not support HTML markup, you can either choose to remove the HTML markup and keep the content, or keep the markup as plain text.


Continue Reading →

Salesforce Partner Learning Paths

Salesforce has published a set of Partner Learning Paths for various streams like Sales Cloud, Service Cloud, Lightning Platform, Marketing Cloud, FSC, Analytics etc. These paths contains tools and resources to grow your skills as an expert adviser in each of these areas.

The Learning Paths can be accessed via
https://sdodemo-main-16123d6e222.force.com/s/

Each of the Learning Paths contain below five stages with helpful trainings, videos, demos and other resources:

1. Meet the Solution
2. Grow your Expertise
3. Pitch the Solution
4. Apply the Solution
5. Stay Updated




Continue Reading →

Lightning Layout Simplified

The lightning:layout and lightning:layoutItem components are used to build grid-based user interfaces on the lightning platform that conform to responsive design guidelines.

The below blog post by Peter Knolle explains with detailed examples how to use the lightning layout components.

http://peterknolle.com/lightning-layout-simplified/
Continue Reading →

Einstein Analytics Learning Adventure

Einstein Analytics Learning Adventure is an excellent app available on the AppExchange. It contains lots of great examples for learning and exploring the various features of Einstein Analytics.

The app walks you through best practice examples for designing right visualizations and for building powerful dynamic apps.

In order to install the app, you need to sign up for an Analytics Developer Edition org at https://developer.salesforce.com/promotions/orgs/analytics-de

Below is the link for Einstein Analytics Learning Adventure app in the AppExchange:

https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000DoLB3UAN
Continue Reading →

Migrating existing projects to Salesforce DX

If your source code is currently in a Developer Edition org or Sandbox org, and you want to move to Salesforce DX, follow the steps given in the below blog by Christophe Conraets.

Migrating Existing Projects to Salesforce DX

The blog post details the below three steps for migrating to Salesforce DX:

1. Convert your project to Salesforce DX
2. Transfer sample data
3. Put your project under version control

https://developer.salesforce.com/blogs/developer-relations/2017/07/migrating-existing-projects-salesforce-dx.html
Continue Reading →