Thursday, April 9, 2015

How to get started with Mavensmate and Sublime Text

We already discussed in our previous blog , how admins can use Mavensmate to connect to Salesforce Metadata and make their life simpler. In this blog we will learn how to download and get started with Mavensmate. 




Given below steps are for windows 64 bit-

Step 1: Download Sublime text 3 and install on your machine, they have various links for windows, windows 64 bit, OSX etc. 


Step2: Browse and select the destination folder where you would like to store Sublime Text 3 files-

Step3: Click on Next

Step4: Click on Finish


We are half way through now, let us download Mavensmate

Step 5: Download MavensMate

Mavenmate is a sublime text plugin, you will find three options to download MavensMate, I prefer to go with the recommended option 1 via sublime text

(OPTION 1) Via Sublime Text Package Control (recommended)

Sublime Text Package Control must be installed: https://sublime.wbond.net/installation1

  1. Open Sublime Text 3 (Sublime Text 2 no longer supported)
  2. Run Package Control: Install Package command
  3. Search for MavensMate
  4. Hit Enter
(OPTION 2) Manual

(OPTION 3) As a Python Package


 

Step 6: Go to view-->show console -->copy paste this code 


Step7: Once the code is pasted you will find MavensMate tab on the top screen, you may receive this error while create the project, this is because you have not yet defined the path where MavensMate will store your project folders. Define the local path on the default settings file.


Step8: Go to C drive and create a folder in User--> Workspace--> mmdev. If you do not have a folder named workspace in user then create a new one. If you see the code in the given screenshot mm_workspace is empty so we have to paste our file path between the quotes " " 


Step9: Paste your file path here "mm_workspace" for example - “C:\\Users\\123sfdc\\workspace\\123”. You are all set to create projects in Mavensmate.


Step10: Go to Mavenmate tab--> Project--> New Project and you are all set.


Deployment: Go to Mavensmate--> Deploy to Server

Make your deployments simple and easy with mavensmate. After you build your stuff in development environment you can go to mavensmate and create projects. Once this is done choose your metadata from the subscription list and update it to create a package. Use this package to deploy between orgs, sandboxes and production environment using Mavensmate. 




This article is good enough to give you a kick start of how to download and began working with mavensmate, although there is lot more to learn and explore in this amazing tool. 


Wednesday, April 8, 2015

How to connect to Salesforce Metadata

One of our stakeholders moved to a different team and no longer wished to receive any kinds of salesforce notifications or emails with respect to his previous role. This means removing stakeholders email from salesforce wherever it is being used. If you are working in a huge organization and you do not know where one's email is currently being used then you need to be ready with your diving suite and fins to take a deep dive in the salesforce and search every workflow rule, case escalation rule, tasks, triggers, lead assignment rules, notifications, apex class, assignment rules etc. not sure what the ETA could be …lol


Let’s take another example, business has come to you with a list of fields that they wish to delete from a page layout, how would you know if it is safe to delete this field? There is a huge possibility that this field is also being used somewhere else right? Are you going to find out by trial and error method by deleting the field in Dev environment? Of course you can try deleting this field and wait to see the error error…bang!!... This field is being used in xyz workflow rule, but what if the field is being used in 5 rules it won’t alert you until you don’t remove it from the first workflow rule then it will prompt the second area where it is being used right? Is there any other way?

There could be more than one way to address this problem but I found the answer by using “MavensMate”. This application does wonders in minutes, quickly connects to your  sandbox, developer org or production environment and provides access to the metadata. Analyze data, build stuff and deploy components using maven-mate. 

What is MavensMate?

Mavensmate is a powerful open source tool to build force.com applications, it extends the functionality found in the Eclipse force.com IDE 

Why is MavensMate Admin’s buddy?
  • Move your metadata using Mavens mate
  • Very easy to install
  • Deploy stuffs that you cannot deploy using change sets
  • Access your org's metadata 
  • Deploy components between environments
  • Multi-tasking during deployments- while your components are getting deployed you can work on other components.
  • Deploy components individually
  • User friendly debug logs
  • Deployment steps are less painful
  • Data fetch from the server is quick
  • You can customize your data selection under project metadata
  • Deployment success or failure report is user friendly 
How to search an email/field in Salesforce Metadata using MavensMate

Step1: Create a new project in MavensMate



Step2: Specify project details 


Step3: Go to "Advanced" tab and select metadata subscription list. Depending on the size of organization mavens mate will take time to connect to your metadata. While searching a field or an email I usually prefer selecting subscription list in groups, this truly depends on the choice of an admin. 



Step4: Click on update subscription 


Step4: Go to Project Metadata tab, select the components and click on update project.


Once you update the project go to sublime text--> files--> open file--> open the package that you just now created. 

Step5: Go to find tab and click on find in files-


Step6: On the bottom side of the screen you will see "Find" "Where" and "Replace" options. Type the name of the field or an email on the Find option and click next. Mavensmate will display all the related matches in the package. 


Finding any data in salesforce metadata using Mavenmate is so quick and easy. 






Tuesday, April 7, 2015

Comparison of Salesforce Campaign IDs

I am sure a lot goes on in each of our professional lives when the day begins and we are kind of juggling with multiple priorities and tasks to finish. Limited time can cause roadblocks for tedious tasks specially when there is a lot of manual comparison to be done between two sandboxes. Thanks to the universe of online tools where we can find most of the answers to our problems by selecting the right tool, although it is a challenge to know which tool should be used in which problem? I happen to come across a similar issue while working on the lead assignment rule. I thought of sharing this on my blog, although the trick is very simple but at times such simple tricks can save us a hell lot of time. 


In salesforce there are exceptional cases when the change set, ANT, or any other custom tools ( Mavens Mate)  does not allow users to pick components on granular level for deployment like Lead assignment rule criteria.  You can either deploy the entire lead assignment rule or make the changes manually.

I came across a challenge where I updated one rule criteria with 40 campaign names and Id’s.Our organization has more than 50 lead assignment rule criteria’s and since the sandboxes are not refreshed very often there is a huge possibility of having differences in the campaign ID’s in the sandboxes. You must be wondering why this is so? When the sandboxes are refreshed from the production the campaign ID’s are identical but if the sandboxes have not been refreshed lately then the new campaigns have to be handled by manually creating them in the sandboxes which definitely makes the campaign ID’s different in each sandboxes. It is recommended to confirm if the target sandbox does not have any discrepancy in the data specially when there are multiple teams and users working and testing on the same development environment, it can get pretty muddy. 

Coming back to the lead assignment rule I have two options
1)      Deploy the entire Lead assignment rule from sandbox1 to sandbox2
2)      Move the changes manually from sandbox1 to sandbox2

Deploying the entire lead assignment rule could be very tempting but we need to make sure if the rule criteria’s and their ID’s match in the source and target sandbox. I used a trick of copying the source sandbox lead assignment rule in a notepad file and named the file as “sandbox1” and target sandbox lead assignment rule as “sandbox2”.

The trick is to compare the campaign Id’s using data comparator and make sure there are no discrepancies. Google any data comparison tool you will find plenty of them and most of them have the same functionality. Follow the steps below to learn, how I compared lead assignment rule of two sandboxes using Winmerge.

Step1: Download any data comparison tool for text files, I downloaded winmerge


Double click on the WinMerge icon from your desktop or the Start bar 

Step2: Go to files à Open 



Step3: Winmerge provides an option of comparing two conflict files side by side. You can browse sandbox1 file on the left pane and sandbox2 on the right pane


Step4: Browse the files in the left and right fields and select ok. Conflicted data will be highlighted with orange. I was surprised to find a lot of data discrepancy in the campaign Id’s between the source and target sandbox. I dropped the idea of deploying the lead assignment rule and manually created the rule criteria for the lead assignment rule in my target sandbox.


Conclusion: From this article we learned a new tool “Winmerge” and a simple trick of comparing campaign id's between two sandboxes.  








Thursday, March 26, 2015

Branding Your Salesforce Community - Community Part 3

Branding is a like a MAGNET that draws people to your organization for collaboration, innovation, excellence, continuous learning, belonging, creativity and empowerment. Branding is very powerful and vital to a community because it can influence people’s decision to invest in your company, campaigns, programs, events, products etc. It is a platform where diverse group of people speak in one voice. It makes your community go from good to great. It is the most distinct advantage that you have in your own competitive sectors of the market place. Earn more opportunities to increase your organization share of dollars by making a strong brand. With this you can inspire people to make difference, make connection with your customers, spread out the company’s mission. 


With Salesforce personalize the community user experience by selecting and customizing different colors for the Tabs, header background, page background, Tab, top border, background color etc. Upload pictures, company logo for the header and footer section of your community. 



Add Tabs to your Community


You can add the tabs that you want your community members to access from the tabs section. If the tabs are grayed out then you might want to go to Administration > Miscellaneous >select show all settings in Community Management. 


With Salesforce personalize the community user experience by selecting and customizing different colors for the Tabs, header background, page background, Tab, Top border, background color etc. Upload pictures, company logo for the header and footer section of your community. 


Login and Registration

In this section you can customize the login process for the community users. The login page that will be selected in this section will override any other login assignments. Community login page can be customized using visual force.



More Links-





Tuesday, March 24, 2015

Managing Salesforce Communities - Communities Part 2

Community is a collaborative platform component that allows us to expose data to the external as well as internal employees. This is a one page stop for the admins to manage and monitor the community activity. With communities you can increase branding, loyalty, get customer feedback from chatter, ideas, reduce your cases by enabling knowledge articles and promote employee collaboration


Let us study in details how to manage Salesforce Community-

To manage community go to Build-> Customize -> Communities->All community
  

1: Status: Manage the status of your community to active or inactive.

2: Customize Template: This section will show the current selection of the template for your community. You can always switch the template if required from customize template section.

3: Select Dashboard: Dashboards provide vital information on memberships, logins, and activity. Select customize and map the dashboards that you want to view to the community managers. You can also download salesforce dashboard package from the App Exchange.

4: Create Reputation Levels: Reputation levels are set to promote the activities in a community and motivate the community members. Members who are more active in the community gain more points. In this section you can set the points, range and levels. Users can move up in the level by earning more points

5: Select Members: Restrict the community access by limiting the profile, similarly users can be provided access by permission sets.

6: Dashboard Settings: Dashboard Mapping can be done here to display the selected data.

7: Topics: Topics is grouping of records around a common theme.

8: Reputation: Reputation is directly proportional to your activity in the community. The more you share, post, comment, help others by answering questions the better your reputation level becomes.

9: Administration: This is the integral part of the manage community where you can set various options like branding your community, customizing tabs, members etc. 

Provide access to the community Members:


Salesforce has consolidated all the required settings for the communities under “Manage “which makes it so much easier for admins to do their jobs. Let us provide access to the users to our community. Users can belong to various roles and profiles. 

Get your community URL from Build > Customize > Communities > All Communities and get the network id. Now get the profile id and create a csv file with columns (networkId, parentId) as shown in the screenshot. 



Parent id can contain permission set, profile id, role id etc. Once the file is uploaded members will be able to access the community management section. To find the network id of your salesforce community 




As we know that the manage options displayed in the manage section of the community changes with the template selection. The options that we see on the on the left Palette is tailored to the Napili template and these might change once you change the template for your community. Please refer the below screen shot to know the Napili Miscellaneous options in detail. 



Manage Topics in Communities

There are three options available under topics- New topics can be created and more than one can be combined to merge into one. Articles can be added to the navigational topics for users in communities. The main topics that you want to display on the community home page can be managed here. 


More Links-



Sunday, March 22, 2015

Salesforce Communities - Part1

Communities are formed by the people who share and are engaged in collective learning. The members have a common passion for the things that they do and interact on everyday basis to make the experience even better.


A community can be incredibly valuable for your organization. Salesforce communities are online platform/space where internal, external employees, customers, partners can collaborate.The main advantage of communities is it lives inside your organization and you can decide which salesforce data you want to share with the community members. Customers can ask for help from online communities and internal support can assist them. They can also access online help from FAQ’s, knowledge, articles, ideas etc.



Security model for communities work in the similar fashion like your internal members. A separate profile can be created for partner portal members and the customers to provide access to apps, tabs, records and objects. 

With communities you can:
  • Get real time feedback
  • Ability to brand and customize your own experience with specific colors pictures etc.
  • Incorporating idea of social intelligence
  • Provide efficient self service
  • Educate partners to sell effectively
  • Give your customer more power and choices
  • Stay connected with your customer 24/7
  • Self-service for partners, customers and employees
  • Blend communities and business process on a single platform
  • Share documentation, files and collaborate.
  • Partners can get answers, engage post ideas and log cases
  • Find resources, answers, best practices and experts
  • The most powerful way to collaborate
  • Portals has been replaced by communities
Steps to Implement the Community in Salesforce:

Use Case:

1-2-3 SFDC Org would like to implement Communities in salesforce for their customers and partners. The Partners and customers should have following access in the community- Chatter, people, groups, accounts, contacts, cases, content, knowledge, libraries, badges, recognition etc. 


Step1: Enable Salesforces Communities and select the domain:

Go to Customize > Communities > Settings and enable communities,the very first step of implementing communities in salesforce is to enable a community for your org. As soon as you check the enable box, salesforce will prompt you to select a unique community domain name. It will automatically prompt if the domain name is available. 


Once you enable the community it cannot be undone. 

You are now ready to create your community

Step2:

Choose an appropriate template from the given options below. We will be using NAPILI template for our use case because we are planning to provide the access to the knowledge that we implemented in our previous posts. Salesforce provides various types of templates- Kokua, Koa, Napili, Aloha and Salesforce Tabs + Visualforce. 




Step 3: Let us enable the global header
You might want to provide access to the global header for the internal users to easily switch back and forth between internal and the external community. This can be done by providing custom permissions to the users -Setup, click Manage Users > Permission Sets or by providing “View Global Header” access from the profile. 


Community Management Page
Community Management page is used by the admins to do the configurations settings required for the community page. The options available in Community Management are based on your community template selection, permissions, and preferences. Following options are all limited to the Napili template. 

Community Management Page can also be accessed from the global header, to access this page you must be logged into the community. All the options that you see in the community are based on the selection of the community template permissions etc. 



Now that we have selected the template,we are all set to manage our community options,In our next post we will learn the various options available under Napili template in salesforce.