Thursday 14 September 2023

12 Steps to build the Salesforce Managed Package using Version Control

Developing a managed package in Salesforce while using Bitbucket and Git for version control and collaboration involves several steps. 

This approach helps you manage your Salesforce code, configurations, and metadata in a version-controlled environment. 

Here are detailed steps to develop a managed package in Salesforce using Bitbucket and Git:

Step 1: Set Up Your Salesforce Development Environment
  1. Salesforce Developer Edition Org:
    If you don't already have one, sign up for a Salesforce Developer Edition org, which you will use for development and testing.

  2. Install Salesforce CLI:
    Install the Salesforce Command Line Interface (CLI) on your local machine. The CLI allows you to interact with Salesforce from the command line.

  3. Install Salesforce Extensions for Visual Studio Code:
    Using Visual Studio Code for development is recommended, install the Salesforce Extensions for Visual Studio Code.

Step 2: Create a New Salesforce Project

In your Salesforce Developer Edition org, create a new Salesforce DX project. This project will serve as the foundation for your package development.

# Navigate to your desired project directory
cd /path/to/your/project

# Create a new Salesforce DX project
sfdx force:project:create -n MyPackageProject

Step 3: Connect Your Salesforce Org

Authenticate your Salesforce DX project with your Developer Edition org by running the following command:

sfdx force:auth:web:login -a MyDevOrg

Step 4: Develop Your Salesforce Package Components

Develop the custom objects, fields, Apex classes, Visualforce pages, Lightning components, and other components that make up your Salesforce package.

Step 5: Initialise a Git Repository

If you haven't already, initialise a Git repository in your project directory:

#Initialize a Git repository
git init

Step 6: Create a Bitbucket Repository
  1. Log in to your Bitbucket account.
  2. Click the '+' icon in the left sidebar and select 'Create repository.'
  3. Fill in the repository details, including name, description, and access level (public or private).
  4. Click 'Create repository' to create your Bitbucket repository.2. 

Step 7: Add and Commit Your Salesforce Project to Git

Add your Salesforce DX project's files to the Git repository and commit them:

#Add all files to the Git repository
git add .

#Commit the changes
git commit -m "Initial commit"

Step 8: Connect Your Git Repository to Bitbucket

Connect your local Git repository to the Bitbucket repository you created:

#Replace <your_bitbucket_repository_url> with the actual URL of your Bitbucket repository
git remote add origin <your_bitbucket_repository_url>

Step 9: Push Your Code to Bitbucket

Push your code from your local Git repository to your Bitbucket repository:

#Push the code to Bitbucket
git push -u origin master

Step 10: Create Package Metadata

Use Salesforce DX commands to create a package that includes the metadata for your managed package:

#Create a new package (replace MyPackage with your desired package name)
sfdx force:package:create -n MyPackage -d "My Package Description" 
#Add package components (objects, classes, etc.) to the package
sfdx force:package:version:create -p MyPackage -x -w 30

Step 11: Develop and Test Package Features

Continue developing and testing your package features within your Salesforce DX project.

Step 12: Distribute Your Managed Package
  1. Complete the development of your managed package.
  2. Go through the necessary steps to package it, including metadata and security reviews.
  3. Distribute your managed package through Salesforce AppExchange or other appropriate channels.

Wednesday 26 November 2014

Simple Android Screen Recording (without video cam or root required)

  1. Android adb (Android Debug Bridge) 
  2. Android device with version 4.4 (Kit-Kat) or greater
  3. Micro USB cable to connect you phone to computer
  1.  In your android device go to “Settings” -> “Developer options” and tick “USB debugging options”.
    (If Developer options are not visible then go to Settings -> About phone -> Tap “Build number” 7 times to start the developer options)
  2. Then connect your device to computer which has adb in it.
  3. Go to the directory in which adb is present and open a command line window there by pressing “shift + mouse right click” and select the option “Open command window here”.
    (Generally adb is present at C:\Users\<Username>\AppData\Local\Android\android-sdk\platform-tools)
  4. Fire the following trial command to check your device is connected or not

    adb devices

  5. If your device is shown in List of devices attached then fire the following command

    adb shell screenrecord /sdcard/<YourFileName>.mp4
  6. To stop the recording press  “Ctrl+c” and then for pulling the recorded video to phone memory fire the following command

    adb pull /sdcard/< YourFileName >.mp4

    Bam it’s done.
    Now go to your gallery and check out your recorded video.

    1. There is a space between following commands
      • adb shell screenrecord <space>/sdcard/<YourFileName>.mp4
      • adb pull <space>/sdcard/< YourFileName >.mp4
    2. For installing adb to your computer you can follow these links
      Installing ADB in windows without Downloading Android SDK
      Installing ADB in windows with Android SDK
    3. To enable touch pointer in video go to
      "developer options" -> tick the "Show touches" options present under INPUT category.
    DevBytes: Android 4.4 - Recording App Videos

Thursday 28 November 2013

What Exactly Is Salesforce1

What Exactly Is Salesforce1?

Mobile Platform
(but without Heroku Connect service)
(with Heroku Connect service)
ExactTarget Fuel
Not Present

It is an API richer Mobile Platform with the combination of Heroku1 and ExactTarget.
Salesforce1 as Mobile platform :
  • Previously salesforce platform was not supporting the responsive design but now Salesforce1 platform supports responsive design due to which now mobile devices can also view the same design as it is.

  • Salesforce1 now provides two apps named as Salesforce1 and Admin app. These are available on Android and iPhone platform.

Salesforce1 with new API :
·        Previously Salesforce platform were providing only 8 APIs.
·        Those are as follows :
3.   Metadata API
4.   Bulk API
5.   Streaming API
6. API
7.   Tooling API
8.   Analytics API

·        Now Salesforce1 platform provides new 9 APIs plus previous 8 APIs. Totally now Salesforce1 platform provides 17 APIs.
·        The new APIs are as follows :
1.   Chatter REST API
2.   GoInstant API
3.   ExactTarget API
4.   Radian6 API
5.   Pardot API
6. API
7.   Live Agent API
8.   Open CTI API
9.   Console Integration Toolkit API

·       These APIs are grouped as follows
o   Collaboration — Chatter REST API and GoInstant API
o   Marketing Cloud — APIs for ExactTarget, Radian6, and Pardot
o   Service Cloud — APIs for, Live Agent, Open CTI, and the Console Integration Toolkit

Heroku1 for Salesforce1 :
  • Heroku was also present in Salesforce platform but in Salesforce1 platform it has been updated to Heroku1.

  • Previously Heroku and Salesforce were working independently.

  • But now Heroku1 contains new Heroku Connect service to keep your Salesforce and Heroku data automatically in sync.

  • Heroku is PaaS where you can instantly deploy your projects written in Ruby, Node.js, Java, and Python.

  • With the support of Heroku platform and integration of Salesforce1 now developer can build more innovative and robust Apps to fulfill the customers’ requirements.

ExactTarget Fuel for Salesforce1 :
  • It’s newly introduced in Salesforce1 platform.
  • ExactTarget Fuel is used to automate entire multichannel (i.e. Email, Mobile, Social, Web) marketing campaigns.

  • We can now integrate ExactTarget Fuel with Salesforce1 platform.

  • For integration ExactTarget has its API. We can make SOAP Call to use the features provided by ExactTarget Fuel.

  • It also provides its SDK for Java, .NET, PHP, Python, and Ruby.

  • It has its Fuel UX (is the user interface toolkit) and Fuel Cloud Editor to accomplish the goals and fulfill the requirement.

  • By using Fuel, developers can get in on the action and help your company create even more relevant and effective campaigns. 

Use of newly introduced APIs in Salesforc1 :
1.   Chatter REST API :
·        Use Chatter REST API for programmatic access to Chatter feeds, groups, and social data in your Salesforce organization.
·        Use Chatter REST API to integrate Chatter into a variety of applications such as mobile applications, intranet sites, and third-party Web applications.
·        Many Chatter REST API resource actions are also exposed as static methods on Apex classes in the ConnectApi namespace.
·        This namespace is also referred to as Chatter in Apex.
·        Use Chatter in Apex to develop Chatter applications on the platform without using HTTP callouts from Apex.

2.   GoInstant API :
·        GoInstant is a JavaScript API for building real-time, collaborative applications.
·        It provides the tools for integrating multi-user capabilities into your application's interface, using real-time, publish and submission messaging for data synchronization, and a real-time data store.
·        GoInstant includes automatic scaling and security features, and works across desktop and mobile platforms.
·        The API also includes pre-defined widgets, such as a User List and Form widget, for faster application development.

3.   ExactTarget API :
·        ExactTarget API helps to utilize all the feature provided by it.
·        Using this API we can send emails to queue of customers from Salesforce1 platform.

4.   Radian6 API
·        Radian6 enables you to listen, analyze, and engage in your customers’ conversations about your company, products, and competitors.
·        Use the Radian6 API to extend the functionality of the Salesforce Marketing Cloud.
·        Radian6 supports the following browsers:
o   Mozilla® Firefox®
o   Google Chrome™
o   Microsoft® Internet Explorer® 9 and above
o   Apple® Safari®
·        Radian6 supports these Salesforce Editions:
o    Developer Edition
o    Enterprise Edition
o    Unlimited Edition:

5.   Pardot API :
·        Pardot enables you to create, deploy, and manage online marketing campaigns efficiently.
·        The Pardot REST API allows your application to access prospects, visitors, activities, opportunities, and other data in Pardot.
·        All Pardot accounts and user roles have full access to the API. Pardot integrates and syncs automatically with Salesforce using a connector.
·        You must authenticate with the API before issuing requests. All requests must use HTTP GET or POST.
·        It supports the same browsers and the same Salesforce Editions which are supported by Radian6 API.

6. API :
· enables you to deliver efficient all-in-one customer service, from customer and content management to business process automation and insights.
·        The API provides a powerful and simple RESTful interface for interacting with your data.
·        With API we can Read all your cases, Search for customers by name, Create a new company, Update an article translation, Delete a topic.
·        It supports the same browsers as Radian6 API.
·        It supports the following Salesforce Editions :
o   Developer Edition
o   Group Edition
o   Professional Edition
o   Enterprise Edition
o   Unlimited Edition

7.   Live Agent API :
·        Live Agent API lets service organizations connect with customers or website visitors in real time through a Web-based, text-only live chat.
·        It supports the same browsers as all other APIs.
·        It supports the following Salesforce Editions :
o   Developer Edition
o   Enterprise Edition
o   Unlimited Edition
o   Performance Edition

8.   Open CTI API :
·        Open CTI helps advanced administrators and developers build and integrate third-party computer-telephony integration (CTI) systems with Salesforce so that Salesforce users can use a SoftPhone without installing CTI adapters on their machines.
·        Salesforce users could only use the features of a CTI system after they installed a CTI adapter program on their machines.
·        Open CTI is a browser-based JavaScript API.
·        It uses browsers as clients to display SoftPhones.
·        Open CTI API is used to create customizable SoftPhones (call-control tools) that function as fully integrated parts of Salesforce and the Salesforce console.

9.   Console Integration Toolkit API :
·        The Salesforce Console Integration Toolkit provides you with programmatic access to the Salesforce console so that you can extend it to meet your business needs.
·        The Salesforce Console Integration Toolkit is a browser-based JavaScript API.
·        It uses browsers as clients to display pages as tabs in the console.
·        With the Salesforce Console Integration Toolkit, you can open and close tabs in the console to streamline a business process.
·        For example, the toolkit lets you integrate third-party systems with the console, opening up an external application in the same window, in a tab.
·        It supports the following browsers :
o   Mozilla® Firefox® version 3.5 and later
o   Google Chrome™, most recent stable version
o   Microsoft® Internet Explorer® version 7 and later