Skip to main content

Posts

Showing posts from 2017

GitHub for Salesforce

Document / Tutorial URL How to use Git with Force.com IDE https://developer.salesforce.com/blogs/labs/2011/04/how-to-use-git-github-force-com-ide-open-source-labs-apps.html Bringing metadata to Git https://developer.salesforce.com/page/Syncing_Salesforce_Org_Metadata_to_Github Sample Salesforce Deployment labs https://developer.salesforce.com/trailhead/module/alm_deployment Git branching model http://nvie.com/posts/a-successful-git-branching-model/ Git tutorials https://www.atlassian.com/git/tutorials http://www.git-tower.com/learn/git/videos

How to use "Apache Ant" a Force.com Migration Tool

Pre-requisite Java JDK Apache Ant, Version 1.6 or later ANT Installation Instructions Define these path variables ANT_HOME = C:\Users\kumamuk01\dev\apache-ant-1.10.1 JAVA_HOME= C:\Program Files\Java\jdk1.8.0_121 Test if ANT is installed properly Mac: export PATH=/Users/kumarijl/apache-ant-1.9.14/bin:$PATH Command Prompt > ant Buildfile: build.xml does not exist! Build failed Command Prompt > ant -version C:\Users\kumamuk01>ant -version Apache Ant(TM) version 1.10.1 compiled on February 2 2017 Install the Force.com Migration Tool Download Force.com Migration Tool You could follow the instructions given in README file within the package. Configure Ant Step - 1: Update build.properties file which contains environment information. Provide User Name and Password or Security Token which will be used by Ant to login to the Salesforce Org. Step - 2: Update build.xml file to contain the build targets. Build targets

Salesforce - Dashboard

Few key features of Dashboard Reports provide all the data shown in a dashboard. Dashboards can show data from more than one report. When refreshing a dashboard, all the data-providing reports must run. If the reports take a long time to run, then the dashboard does too. Dashboards are shared via folders. Whoever has permission to the folder your dashboard is saved in also has access to your dashboard. Ensure that you save your dashboard in an appropriate folder. Filter a Dashboard Each dashboard can have up to 3 filters. Contact Salesforce to increase the filter options limit in Salesforce Classic. A maximum of 50 filter options is possible. You can’t add filters to dashboards that contain Visualforce or s-control components. It’s not possible to filter on bucket fields. However, it is possible to use a report filtered on a bucket field on the dashboard page. Filters aren’t applied when you schedule or email a dashboard. You can’t filter data on a joined report in das

Salesforce - Scheduling a Schedule Job

Following are the different ways to schedule a Schedule Job through a script. Run the given code in Execute Anonymous window and then you could see in Setting -> 'Scheduled Job' that your Job is waiting to be executed. Run a Schedule Job NOW Method - 1 ScheduleSalesTargets c = new ScheduleSalesTargets(); c.execute(null); Method - 2  (This one I prefer, whenever I need to run a job) Check the current Time. If it is, let's say 10:39 AM, in your clock, then set the minute to 41. This will schedule the job for 10:41 AM just two minutes from now. But, if you set minute value to 38, then it will schedule to next hour 11:38 AM ScheduleSales c = new ScheduleSales(); String sch = '0 0 * * * ?'; System.schedule('Sales Job Name - 1',  '0 41 * * * ?', c); You could repeat following, so that job keeps running every 5 minutes while you debug and change the Apex code behind the scene. ScheduleSales c = new ScheduleSales(); String sch = &#

Salesforce for Outlook

The Salesforce for Outlook Desktop Integration could be used to synch following: Contact Event Task Email and Attachment Installation Instruction Launch Outlook and Salesforce for Outlook. You should see below OAuth window, where you would need to provide you authentication. Configuration User Experience References Install and Set Up Salesforce for Outlook -  https://help.salesforce.com/articleView?id=outlookcrm_install.htm&type=0

Salesforce Power Query

Note: Microsoft Power Query will not work with recently planned Security upgrade of Salesforce. TLS 1.0 will be upgraded to TLS 1.1 or TLS 1.2 in Salesforce Production environment. Look for Power BI Some guidance around Microsoft Power Query usage for Salesforce Platform. Power Query Usage / Highlights Retrieve User Data from Salesforce Read Only Access to Salesforce Connection to Salesforce is made on behalf of User. In other words, Login Session belongs to the User. Power Query utilises Salesforce OAuth security framework to connect to Salesforce Installation Guide Follow the instructions as provided here  https://powerbi.microsoft.com/en-us/blog/4-new-updates-in-power-query/ References Announcing Power Query Support for Salesforce -  https://powerbi.microsoft.com/en-us/blog/announcing-power-query-support-for-salesforce-com/ 4 new updates in Power Query -  https://powerbi.microsoft.com/en-us/blog/4-new-updates-in-power-query/

Salesforce - Microsoft Power BI

This document outlines basic steps to install and configure Power BI with Salesforce. Usage / Highlights Retrieve User Data from Salesforce Retrieve Reports from Salesforce Read Only Access to Salesforce Connection to Salesforce is made on behalf of User. In other words, Login Session belongs to the User. Power BI utilises Salesforce OAuth security framework to connect to Salesforce Previous version of Power BI used to be Power Query, but not supported for TLS 1.1 or higher, thus could not connect to Salesforce after TLS 1.1 Security upgrade. Find details on Power Query Installation  here . Installation - Power BI Publisher for Excel Download Link  Download Power BI publisher for Excel Download for Office 64 Bit ( or 32 Bit) as needed. Close Microsoft Office Application Double click the installer file named "PowerBIpublisher_[64bit][en-us].msi" Installation - Power BI Desktop  Follow the guide as provide on this site -  https://powerbi.microsoft.com/e

Salesforce - Report Types

This document captures key points for a reference to how and where to use these report types. Before we did deeper a few lines on different types of reports. Tabular Report Tabular reports are the simplest and fastest way to look at data. Similar to a spreadsheet, they consist simply of an ordered set of fields in columns, with each matching record listed in a row. Tabular reports are best for creating lists of records or a list with a single grand total.  They can't be used to create groups of data or charts Can't be used in dashboards unless rows are limited. Examples include contact mailing lists and activity reports. Summary Report Summary reports are similar to tabular reports, but also allow users to group rows of data, view subtotals, and create charts. They can be used as the source report for dashboard components. Use this type for a report to show subtotals based on the value of a particular field or when you want to create a hierarchical list, such

Salesforce Code and Configuration Deployment

Following are a varied list of ways through which Code or Configuration could be deployed in Salesforce Server. It is assumed that deployment focus would be on Production instance, but it is true with Developer Edition and Sandbox instances as well. Technical Prerequisites for a Salesforce Deployment There are some tools and software that must be installed and properly configured on the Release Manager’s machine in order to enable the Deployment Process described in this guide. Some other tools are not required but we recommend using them. Here is a quick description of these tools. Tool Required / Optional Purpose Comment Eclipse Optional Eclipse is a developer tool that supports several languages. The currently recommended version of Eclipse to download is Eclipse Kepler 4.3 (the “Eclipse for Java developers” version is recommended) and can be downloaded from http://www.eclipse.org/downloads/pac

Salesforce Data Backup Strategy

Data Export Weekly or monthly (Professional/DE) Doesn't include Formula or Rollup summary Export is queued and timing is not guaranteed Large Files could be split into batches thus separate Exports. 512 MB (approx.) of each file sizes Email is sent with URL of downloadable zip, which is deleted after 48 Hrs Column heading are not ordered, so further reprocessing of exported file should rely on Column Names rather than their position Only Active User can run Data Export, even for the scheduled jobs Not supported in Sandbox Data Loader Export wizard Export the data manually or through Command Line Data Loader that can be converted to a scheduled through the script. Basically, the script which calls Data Loader to extract data from Salesforce can be scheduled through Operating System provided scheduler. Full Sandbox Copy Expo As the name suggest, a Full Sandbox Copy can be taken regularly as a backup strategy. As per the enterprise backup strategy, more Sandbox c

SOQL - Examples

ProcessInstance Get list of Processess for Object SELECT Id,Status,SubmittedById,TargetObjectId FROM ProcessInstance where Status = 'Pending' and TargetObjectId = 'a1m14000002gvWG' SELECT Id, CompletedDate, ElapsedTimeInDays, ElapsedTimeInHours, ElapsedTimeInMinutes, LastActorId, ProcessDefinitionId, Status, TargetObjectId FROM ProcessInstance WHERE id =:result.instanceId] ProcessInstanceWorkItem select Id from ProcessInstanceWorkitem where ProcessInstanceId = '04gW0000000X2Y1IAK' SELECT Description, Id FROM ProcessDefinition Scheduled Jobs SELECT Id, Status, ApexClass.Name, CreatedBy.Name, CreatedDate,CompletedDate FROM AsyncApexJob  where ApexClass.Name = 'ScheduleSalesTargets' Order by CompletedDate CronTrigger and CronJobDetail objects SELECT Id, CronJobDetail.Name, NextFireTime, PreviousFireTime, State, StartTime, EndTime, CronExpression, TimeZoneSidKey, OwnerId, LastModifiedById, CreatedById, CreatedDate, Tim