Pages

Friday, August 26, 2016

Salesforce: Enable Drag-and-Drop Scheduling on List Views

In earlier blog, we discussed about how to drag and drop to edit event from Calendar. Today we will share about feature to drag and drop scheduling on List Views.

This feature will let users create events associated with records by dragging records from list views to weekly calendar views and entering event details in an interactive overlay. The fields available in the event detail and edit overlays are defined in a mini page layout.

Admin need to enable this from Setup | User Interface | select Enable Drag-and-Drop Editing on Calendar Views | select Enable Click-and-Create Events on Calendar Views, then you can select Enable Drag-and-Drop Scheduling on List Views


This feature is only enable in Classic for Account, Contact, and Lead List View only, and Tab view is not count, meaning you need to select a View to see this.



1. Click the Open Calendar icon Open Calendar link at the bottom of a list view.
    A weekly view of a calendar appears below view.
 


2. Drag a record from the list to a time slot on the calendar.



3.  A popup window for creating an event appears. The event is already related to the record that you dragged from the list view.




Notes:
  • Drag-and-drop scheduling isn’t available for the Console tab, events that people have been invited to, recurring events, accessibility mode, or Connect Offline.
  • List views that include drag-and-drop scheduling can take slightly longer than usual to be displayed.
  • When you drag the bar in between the list and calendar to resize either one, the size is saved for all views in which you use drag-and-drop scheduling. You can resize the list and calendar at any time.


Reference:


Thursday, August 25, 2016

Salesforce: Enable Drag-and-Drop Editing on Calendar Views

In current era of Lightning; Classic still in the heart of many Salesforce users, and this blog is going to explain on how to use drag and drop in editing on Calendar Views, at this moment this feature only for Classic. Admin need to enable this from Setup | User Interface | select Enable Drag-and-Drop Editing on Calendar Views.

This feature will enable dragging of events on single-user, daily and weekly calendar views. This allows users to reschedule events without leaving the page



Once enabled, go to Calendar Day View or Week View (not Month View).



You should be able to drag and drop existing event for the week or day, this feature is not for Month View.



If you have Enable Click-and-Create Events on Calendar Views enabled, this will let users create events on day and week calendar views by double-clicking a specific time slot and entering event details in an interactive overlay. The fields available in the event detail and edit overlays are defined in a mini page layout. Recurring events and multi-person events aren’t supported for click-and-create events on calendar views.



Reference:


Sunday, August 21, 2016

Compilation of Salesforce Blogs with Alexa Rank

You are active Salesforce blogger, but not see your name here...

You are Salesforce blogger, your name listed here, but some information is wrong...

You are Salesforce blogger, your name listed here, but you want to withdraw...

Comment below on this blog !

Thursday, August 18, 2016

Salesforce Migration Tool using ANT in Windows


Prerequisites

1. Java
Make sure JDK is installed in your computer.
Check it from Control Panel\All Control Panel Items\Programs and Features



** if you do not have JDK installed, download latest JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Once installed successfully, check from command prompt:
C:\>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) Client VM (build 25.45-b02, mixed mode, sharing)

** if your JAVA_HOME variable and environment Path have not configured, follow this step:
- Go to Advanced system settings from Control Panel\All Control Panel Items\System, click Environment Variables... button, go to System variables
- New variable JAVA_HOME value C:\Program Files\Java\jdk1.8.0_102 
- Edit Path variable to add value %JAVA_HOME%\bin


2. ANT
Get latest Apache ANT from http://ant.apache.org/bindownload.cgi and select .zip archive file.
Download the file to a folder and extract it.

You need to add this into System variables from Advanced system settings from Control Panel\All Control Panel Items\System, click Environment Variables... button.
- New variable ANT_HOME value C:\SFDC\Ant\apache-ant-1.9.7-bin\apache-ant-1.9.7
- Edit Path variable to add value %ANT_HOME%\bin

Once installed successfully, check from command prompt:
C:\>ant -version
Apache Ant(TM) version 1.9.7 compiled on April 9 2016


3. Force.com Migration Tool
Download Migration Tool from https://developer.salesforce.com/page/Force.com_Migration_Tool, at this moment it will bring me to https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_37.0.zip, this may change based on Salesforce release. Extract salesforce_ant_37.0.zip to a folder.


Concept

You need to work with 3 files:

1. build.properties
You can find sample of this file from "sample" folder from salesforce_ant_37.0.zip
In this file, you need define: serverurl, username, and password. Sample:
sf.serverurl = https://login.salesforce.com
sf.username = mylogin@gmail.com
sf.password = mypassword8

2. build.xml
This file also available in "sample" folder from salesforce_ant_37.0.zip
In this file, you need to define the target. The concept here is you need to retrieve the metadata from source org., then deploy it to target org.

For retrieve
<target name="retrieve">  
  <!--<mkdir dir="retrieve_folder"/> -->
  <sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieve_folder" unpackaged="package.xml"/>
</target>

** mkdir retrieve_folder, this line is just needed if you need the script to create the folder prior retrieval, you can change retrieve_folder to other folder as you want.

For deployment
<target name="deploy"> 
  <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="retrieve_folder" rollbackOnError="true"/>
</target>

3. package.xml
You can find sample of this file from "sample\codepkg" folder from salesforce_ant_37.0.zip
You need to manually add/update all the components you want to deploy.
Sample:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> 
  <types>        
    <members>Access_Account</members>
    <members>View_All_Data</members>
    <name>PermissionSet</name>
  </types>
  <types>
    <members>Change__c</members>
    <name>CustomObject</name>
  </types> 
  <types>
    <members>Sales Regional</members>
    <name>Profile</name>
  </types> 
  <version>37.0</version>
</Package>

For me personally, I prefer to create a folder and put all 3 files above into that folder for each deployment.

For complete Metadata Components and Types, see https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm


Action

This is exciting part where you will start using ANT

To retieve
C:\SFDC\Ant\salesforce_ant_37.0\sample>ant retrieve
Buildfile: C:\SFDC\Ant\salesforce_ant_37.0\sample\build.xml

retrieve:
[sf:retrieve] Request for a retrieve submitted successfully.
[sf:retrieve] Request ID for the current retrieve task: 09S17000001OuaREAS
[sf:retrieve] Waiting for server to finish processing the request...
[sf:retrieve] Request Status: Pending
[sf:retrieve] Request Status: Succeeded
[sf:retrieve] Finished request 09S17000001OuaREAS successfully.

BUILD SUCCESSFUL
Total time: 28 seconds

To deploy
C:\SFDC\Ant\salesforce_ant_37.0\sample>ant deploy
Buildfile: C:\SFDC\Ant\salesforce_ant_37.0\sample\build.xml

deploy:
[sf:deploy] Request for a deploy submitted successfully.
[sf:deploy] Request ID for the current deploy task: 0Af21000002F9xACAS
[sf:deploy] Waiting for server to finish processing the request...
[sf:deploy] Request Status: Pending
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: Succeeded
[sf:deploy] *********** DEPLOYMENT SUCCEEDED ***********
[sf:deploy] Finished request 0Af21000002F9xACAS successfully.

BUILD SUCCESSFUL
Total time: 30 seconds


Reference:


Wednesday, August 17, 2016

Salesforce: Working with Minute, Hour, Day in Workflow, Validation Rule and Formula Field


Use Case: based on some criteria, Event Reminder must be set to 30 minutes prior Event Start date time.

Solution:
Use Workflow with Field Update or Process Builder, but the logic should be the same. In this case, I'll use Workflow with Field Update for simplicity.

1. Create Workflow Rule and determine the business logic when Field Update action should trigger.

2. Create Field Update action with following formula: ActivityDateTime - 0.020833

Desc:
- ActivityDateTime = Event Start
- 0.020833 come from 0.5 / 24, where 0.5 = 30 minutes

Notes: when we use a number in Workflow or Formula or Validation Rule for Date or Date/Time field, it is for 1 day count. So for 2 hours, it would be 2/24 = 0.083333

So, when you try to calculate fields of date (date/time), example: NOW() - CreatedDate, this will produce number in days, example: 32.50 meaning 32 days 12 hours.


ReferenceDate/Time Calculations in Formula Fields, Workflow Field Updates and Validation Rules



Tuesday, August 16, 2016

Salesforce: Data Import Wizard to update Account

Data Import Wizard maybe not so famous compare to Data Loader or other 3rd party tools, such as: dataloader.io or workbench. But, for simplicity and to be used by super user, not system admin, Data Import Wizard may be a good option.

Use case: super user need to mass update certain fields. List View is not an option because the fields will be update with different values and for multiple fields.

Step-by-Step:
1. Navigate to Data Import Wizard menu: Setup | Data Management | Data Import Wizard

2. Click Launch Wizard! button

3. Select "Accounts and Contacts" under Standard object, if the user does not see "Accounts and
Contacts", make sure the user have Import Personal Contacts permission.


4. Select "Update existing records" under "What do you want to do?"

5. Leave "Match Contact by" to default value since we are not updating Contact

6. Change "Match Account by" to "Salesforce.com ID" since I have Salesforce Account Id

7. Make sure to select "Update existing Account information"


8. Drag CSV fiel to upload

9. Click Next to continue

10. Click Change link under "Account: Salesforce.com ID, Contact: Salesforce.com ID"



11. Remove Contact Id from mapping



12. Click Next, then Start Import button


Once done, user should get email from Salesforce with:

Subject: Salesforce import of "filename.csv" has finished. 999 rows were processed.
Content:
Your Accounts import is complete. Here are your results:
Accounts Created: 0
Accounts Updated: 999
Accounts Failed:  0 (We couldn't import these due to errors.) Processed job information for
imported Accounts: No link is available because you do not have the correct permissions to
manage Bulk Api jobs.

If user have Bulk Api jobs permission, they will see:
Accounts Failed:  0 (We couldn't import these due to errors.) Processed job information for
imported Accounts: https://na3.salesforce.com/75017000001eNj3AAE?fromEmail=1

Permission to manage Bulk Api jobs is Manage Data Integrations


Reference: