Pages

Tuesday, May 30, 2017

As per API 39.0, looking at ListView object, we can't retrieve who can access a list view with simple SOQL query. But, looking at this metadata API documentation, we can retrieve who can access a list view using sharedTo field. We can use a SOQL query for this, as this is metadata API.

Here is the step by step to retrieve that info, you will need to use Workbench.
Let's say we would like to check who can access a list view called "Account start A".

1. Get the "fullName"
From Workbench:
- select Info | Metadata Types & Components
- select Listview from the dropdown
- click Expand all and find the view name
- if the view is "Visible only to me", you will not find it here

- extract the zip file
- look for object folder
- in my case, this is account object, so open "Account.object" file with any text editor
- here is the result, you will easily see who have access to the view

From the XML returned:
- the 1st view "Account_start_A" is shared to 1 group and 3 roles
- the 2nd view "NewThisWeek" is visible to all users, therefore there is no sharedTo tag
- the 3rd view, "RT_Ke2" is shared to 1 group and 1 role with subordinates.

Let's randomly confirm if the return is correct:

Additional notes:
With REST explorer from Workbench, we can get data of list view, example:
- to get all list view in Account: /services/data/v39.0/sobjects/Account/listviews/

- to get list view data from a list view:/services/data/v39.0/sobjects/Account/listviews/00B50000008DouiEAC/results

Sunday, May 28, 2017

Salesforce1 app is nice, it gives you access to your Salesforce data and application with no cost and lower effort to configure. But in some organization, it has to be off due to compliance guidelines or security protocols, administrators may be asked to prevent all User from accessing the Salesforce1 platform.

To completely eliminate your Users' ability to access the Salesforce1 interface, you will need to make the following changes:

Ensure that the 'Permitted Users' value under 'OAuth policies' is set to 'Admin approved Users are pre-authorized', and click Save.

2. Deactivate from User Profile
Navigate to User Profile and ensure that the 'Salesforce1 for Android', 'Salesforce1 for iOS', and 'Salesforce1 for Windows' permissions are all disabled under the "Connected App Access" section. Once all of these have been disabled, save the changes for the Profile and repeat these steps for all Profiles in your organization.

3. Salesforce1 mobile browser app
To ensure that your Users are not able to access the browser-based version of Salesforce1, navigate to Setup | Apps | Mobile Apps | Salesforce1 Settings. From here, ensure that the 'Enable the Salesforce1 mobile browser app' option is unchecked, and click Save.

Now, let's see what happened when user login to Salesforce1

Next, we need to enable Salesforce1 for a few users to test if Salesforce1 can be approved as the corporate-wide app. There are 2 options:

1. Profile
If all the users are located under the same profile, open the profile and look for Salesforce1 under 'Connected App Access'.

2. Permission Set
This would be more flexible as you can enable it user by users across profiles. Ideally, you should create new Permission Set, click 'Assigned Connected Apps', click Edit button and look for Salesforce1 for... and lastly assign the permission set to the users.

Sunday, May 21, 2017

When you are doing reports clean-up, you may not be able to delete reports that are used as the data source for the dashboard.

So, we need to find out the report is used by which dashboard:
1. Create a new custom report type with primary object "Reports"
2. Report type label: "Reports with Dashboard information"
3. Store in Category "Administrative Reports"
4. Click relate to another object
5. Select "Dashboard Components"

6. Save

Now create a new report using above report type created, I would like to add following fields in the report:
- Report Name
- Report Unique Name
- Report ID
- Dashboard: Title
- Dashboard Column
- Dashboard Component ID

Sunday, May 14, 2017

I thought News component is standard and available to use in Lightning App Builder, but when I edit Home page, I see the News component is not there, the screenshot below taken from "Home" page, the same experience when I go to Account, Contact, Lead, and Opportunity lightning app builder page, I can't find the News component too.

As per this Salesforce article The News Component, News component is available from Group to Unlimited Editions, but why it is not available?

Now, back to Lightning App Builder for Home page, and notice the News component are now available to use, the same when I edit Account, Contact, Lead, and Opportunity lightning app builder page.

Let's see what is offered by News component and where it exists. This component will get instant access to relevant, timely news about customers, partners, and competitors. The News component includes articles and Twitter posts, and is available on Accounts, Contacts, Leads, Opportunities, and the Home page. It provides relevant, timely news items that help you stay up-to-date with the companies, people, and industries you work with. News is available from US news sources in English.