Pages

Sunday, March 26, 2017

Salesforce Lightning: Customize Fields on Recently Viewed List


When you click a tab in Salesforce, you will see default columns / fields from records recently viewed. For most list views, your users can select which fields to display and how to order the view columns. However, they can’t edit the recent records quick list on object home pages. Only Salesforce admins can select and order the fields to display for the recent records view.

In Classic, to modify fields displayed in the Recently Viewed List on Object home pages, navigate to Setup | Customizeobject name | Search Layouts, click the object name Tab, you can select fields would like to show in the Recently Viewed List. You can order columns by selecting one or more fields from Selected Fields and clicking Up or Down.

If you are familiar with the step in Classic, this is different in Lightning Experience. If you follow above steps, the Recently Viewed List on Object home pages will not change. So, follow this steps:
  1. From Setup, enter Object Manager in the Quick Find box, then select Object Manager.
  2. Click the label name of the object for the Recently Viewed list you want to modify.
  3. From the menu of links at the top of the page, click Search Layouts.
  4. In the far right of the Search Results column, click arrow icon and select Edit.
  5. To add columns to the Recently Viewed list, select one or more fields from Available Fields and click Add. To remove columns, select one or more fields from Selected Fields and click Remove.
  6. Order columns by selecting one or more fields from Selected Fields and clicking Up or Down.
  7. Click Save.


ReferenceSelect Fields to Display in the Recently Viewed List on Object Home Pages in Lightning Experience



Sunday, March 19, 2017

Salesforce: VLOOKUP


Some of us, Salesforce admin, maybe familiar with the popular VLOOKUP() function in Ms Excel from our previous job. But how about VLOOKUP() function in Salesforce? Yes it is exist, but not really very similar. VLOOKUP() in Salesforce able to retrieve a field based on a key data, so they are still not too much different, but in Salesforce, until now Spring 17 release, it only for validation rule, while ideally this should be expand to Workflow and Formula Field, vote for this formula in Ideaexchange.

Here is the fact:
1. This function is only available in validation rules, not in formula field, workflow and so on, see this blog Functions versus Rules matrix.

2. Syntax: VLOOKUP(field_to_return, field_on_lookup_object, lookup_value).

3. The field_to_return must be an auto number, roll-up summary, lookup relationship, master-detail relationship, checkbox, date, date/time, email, number, percent, phone, text, text area, or URL field type.

4. The field_on_lookup_object must be the Record Name field on a custom object.

5. The field_on_lookup_object and lookup_value must be the same data type.

6. The value returned must be on a custom object.

7. You cannot delete the custom field or custom object referenced in this function.


Scenario: when save on Account, system should check if the competitor is correct by looking number of branches.

Solution: create a validation rule with VLOOKUP() function.
Number_of_Locations__c <=
VLOOKUP(
$ObjectType.Competitor__c.Fields.No_of_Branches__c, $ObjectType.Competitor__c.Fields.Name,
Name
)

This function will return No_of_Branches__c from Competitor__c object, based on Name field from Account (you can replace Name here with a custom_field__c) and compare with Name field from Competitor__c object. Number_of_Locations__c and No_of_Branches__c must be in the same field type.

If VLOOKUP() cannot find the competitor name, it will skip the validation rule, and the lookup value is not case sensitive.


ReferenceFormula Operators and Functions I–Z




Friday, March 3, 2017

Salesforce: Lightning Login with Fingerprint

In my earlier blog Introducing Lightning Login, we discussed about how to setup Lightning Login, but many of you ask why I do not see fingerprint option, if my device support it.

To use Lightning Login, your admin must first enable Lightning Login for your org., then assign you with Lightning Login User permission. Lightning Login requires Android version 5.0 (Lollipop) or later or iOS 8 or later. If you’re using an iPhone, enable fingerprint or PIN identification. To use your fingerprint on an Android phone, first set up a PIN, pattern, or password.


As you see from above flow:
1. Click—Look for the lightning bolt next to your Lightning Login–enabled username, and click your username.
2. Tap—On your mobile device, tap the notification from the Salesforce Authenticator app.
3. Touch—Verify your identity with your fingerprint or PIN. Presto! You’re logged in.

In step 3 Touch, you can use fingerprint or PIN, but we haven't see this in the earlier blog.
This is simply because as admin, you need to grant Two-Factor Authentication for User Interface Logins permission to the user, either by Profile or Permission Set.

Once this permission is added, if user have enable Lightning Login, after user tap Approve in the device, user will be asked for fingerprint.



In other scenario, if Two-Factor Authentication for User Interface Logins permission has been given and activate by user prior Lightning Login, when user Enroll for Lightning Login, user will be asked for fingerprint when they enroll.




Reference:


Wednesday, March 1, 2017

Salesforce: Introducing Lightning Login

Since Winter '17 release, Salesforce introduce Lightning Login, this has nothing related with Lightning Experience, and Lightning Login work with both Classic and Lightning Experience.

With Lightning Login, after open Salesforce login page, you just simply click your username and tap approve from your mobile device. If your phone support fingerprint, you can make this further secure by authenticate with fingerprint. So no more entering username and password, just click and approve!


How to implement Lightning Login?
Admin 
1. Activate "Lightning Login" in Session Setting.
2. Add permission "Lightning Login User" to Permission Set or Profile.
3. Assign permission to users if you use Permission Set.

User
1. Install Salesforce Authenticator in mobile app (this is the same app for 2FA implementation).
2. Navigate to your User Detail page and click Enroll link next to Lightning Login.



3. Register for Identity Verification, Salesforce will send you verification code.


4. Once verified, you need to add New Account in Authenticator app, copy the two-word phrase into Salesforce and click Connect.



5. Tap "Connect" button in the Authenticator mobile app. You will get another email from Salesforce that a new verification method was added to your account "approve notifications from Salesforce Authenticator".

6. Next, you need to Approve from your mobile app.



7. Done, Salesforce will email last email say that you've enrolled in Lightning Login, you can now log in using your username and an authenticator app instead of a password.

8. Logout and login back, make sure to tick "Remember me" checkbox, notice a small lightning icon is added next to your user photo.



Normal Login
Once all setup, here is the flow to login with Lightning Login
1. Login to Salesforce from login.salesforce.com (or your custom my domain)
2. Click your username (notice lightning icon added next to your photo)
3. Tap "Approve" button from your device with Authenticator app


How to Cancel Lighting Login?
Navigate to your User Detail page and click Cancel link next to Lightning Login and Disconnect from Salesforce Authenticator.