Just because you are not a Developer does not mean you can't use great developer tools to get more stuff done in Salesforce. This is how I use MavensMate and Git for configuration and backup of Salesforce - and I'm not a developer.
But changesets can do less https://help.salesforce.com/apex/HTViewHelpDoc?id=changesets_about_components.htm&language=en
You can do these things using Eclipse, but I just like Maven's Mate, so that is what this article focuses on. |
These features will only be possible in the Enterprise (or Developer etc) editions. "creating a custom field dynamically is not possible in GE/PE even with the API Token" from http://www.salesforce.com/us/developer/docs/packagingGuide/Content/dev_packages_api_access.htm |
All these tools are available on Mac and Windows - the screen shots and steps below are from Mac and may be different to Windows |
Git is a bit different than Github. Git is very techy and is usually used from the command line by issuing text commands. I use SourceTree because it is not very techy and is not that much different than using a simple text diff tool, and a backup tool (well the way I use it anyway). I know that I could learn much more and use git and SourceTree in a much better way, but for the purposes of this article you really don't need to know much about git... we are just using SourceTree and BitBucket to save your Salesforce Configuration.
You will still want to have a Github account (yes, I have one), even if it is only to make bug submissions or share Gists. (Gists are pretty cool, and they can even be secret - well not show up in the main Github search, anyway).
In this article I am not covering anything about branches and pull requests and merging. You can delve into that in your own time - and it may be useful if you work with a team. There are a few great git tutorials eg https://www.atlassian.com/git/tutorial and and http://try.github.com/ and http://pcottle.github.io/learnGitBranching/. For our purposes in this article, commit is the same as backup .
Yep, Sublime Text is just a text editor, but it is pretty cool at being just a text editor. It costs US$70 and whilst you can use it with "buy me" prompts, it is worth buying if you use it a lot. There is SO MUCH I don't know about using Submlime Text it is not funny. But every time you use it, you will learn a few things more.
You might think that Sublime Text is a plugin for MavensMate, but it's the other way around. MavensMate is a plugin for Sublime Text. MavensMate is a really cool tool that uses the Salesforce Metadata and Tooling APIs to modify your Salesforce configuration. It does similar things to Eclipse, but in a much more elegant and quicker way. MavensMate has a new version and these notes are for the original versions of MavensMate, with some adjustments for the new version, which are noted.
Note. When MavensMate installs a new version it seems to keep the old version installed, so go and uninstall the old version when you are happy with it.
Bitbucket is a tool that can host git repositories. Really the only thing you need to know about it right now is that it is similar to Github in many ways, but it has free private repositories. That means you can store your Salesforce configuration in the cloud and it is password protected. If it's on github it's going to be visible to the world, and that may not be good for your organisation. You can pay US$7/month and get private repositories on Github and do similar things - the choice is yours. Bitbucket is made by the Australian founded company, Atlassian, who also make Confluence, the fabulous tool you are reading this article on right now. Oh, and the other cool thing you can do with Bitbucket is sharing - so if you have a few in your team, you can share your repositories.
SourceTree is another app by Atlassian. Yep, I know I could get really techy and use Git via the command line, but hey, we are not devs here, and we just want to do things simply, so Source Tree is a great tool to do this job.
Note: the latest version of Source Tree for windows has a known bug. Please download the older version.
Installing SourceTree will also install Git - just use the embedded Git unless you really want to get techy. It's OK to then say you don't want to use Mercurial.
When installing SourceTree just use PuTTY unless you have a particular need/want to go down the Open SSH route (eg you have an IT person saying it's the only way to go). Say No and create an SSH key later.
See Useful Google Chrome Extensions for Salesforce for more details.
I haven't covered installing all the tools on this article. I do remember it was a bit of a pain to get it all working well. If I ever have to install them again, I will update this article.
As the following article suggests - use Sublime Text Package Control to install it. http://mavensmate.com/Plugins/Sublime_Text/Installation.
Open ST. Use the MM menu to create New Project. For the new MavensMate App the App has to be open first before you can use the Project menu. It is really kind of annoying. I did like the old way it worked.
(note: I do have a licence for ST, I just haven't registered it on this machine yet).
There are a lot of keyboard shortcut commands for Sublime Text, but as we are probably more familiar with menus and clicks (clicks, not code), I will show all the menu based commands, but see http://mavensmate.com/Plugins/Sublime_Text/Shortcuts for shortcuts. |
Enter the Name of the Project, your User Name and the Password+Token - chose Production or Sandbox. Go to the Advanced Tab.
The location will default to the location you set up in your settings file (mm_workspace http://mavensmate.com/Plugins/Plugin_Settings).
After you click the Advanced Tab or click Create Project, MM will log you into SF.
After you click Create Project, it will take a bit of time to download all the metadata and create the project in ST.
Note: the screenshots here show Update Project for an existing project - the options are the same for a new project - you just have a Create Project button.
This is where you choose what metadata to sync. It is easy to just choose everything, but it will dramatically slow your syncing down.
In this list, you can't select ALL options at once - you have to click 51 times - probably to make you avoid clicking every single one of them.
The default is 7 items selected, but you can change the settings file with mm_default_subscription. See SubscriptionSettings.txt for a list of the (current) 51 items.
This screen is a little tricky - click on the drop down list again to hide the list of options and reveal the rest of the form.
Remember to click Update Subscription when you are done - not to be confused with Update Project.
If the Refresh Index button is displayed, click that also (and wait). You will hear the nice MM "ding" when it's done.
On this list you can chose all at once.
Check the unlabeled grey checkbox
Click Update Project when finished. The "ding" will sound when it's done.
Objects, Page Layouts etc from Managed Packages (Apps from the App Exchange or maybe from a Developer you are working with), will NOT be in this list. You have to manually add the names to the package.xml file. See http://salesforce.stackexchange.com/questions/13852/how-to-retrieve-layouts-of-customs-objects-belonging-to-a-managed-package for more info. Example:
|
Hopefully you won't need to delve into here too much if you are not a developer.
The src folder contains all the Salesforce configurations "source" - the metadata (or structure) of your whole Salesforce org
The files are in generally XML format, except for the code files (triggers, classes).
If you ever need to understand anything about the metadata, check the Developer Reference http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/meta_types_list.htm
Eg Account.object
Each Standard and Custom Object in your Org is has a file. It may look a bit daunting but use your search (ctrl+f) to find a field name that you know, and then work back from there.
See Object Metadata
Each Layout has it's own file.
When you have a number of Rules for Page Layouts the only real way to keep them up to date easily is through the metadata API.
See Layout Metadata
Quickly modify or duplicate reports with different parameters
Quickly modify some text - especially if multiple emails are affected.
Search the permission in each Profile
You can't duplicate Actions via Setup - you can here!
Using your fields exported from the List Fields for Object command, modify the text to quickly add all the new fields to the Report Type
Quickly duplicate workflows with different conditions.
Find where a field is used in the workflow.
Modify conditions.
Open SourceTree
It's done - your Salesforce Metadata is now backed up to the cloud.
If you are in Sandbox you can modify Triggers and Classes. If you are in Production, you can look at the code, and you can set triggers to be inactive, but you can't modify it.
One good thing about looking at code through ST is the colours!
Code comes in pretty colours (yes, it is blurred out).
Use the List Fields for Object command to list the fields in a selected object - helpful for pasting into any documentation you may be doing.
It's a simple list, and I think that Grey Tab provides a better way of accessing this information, but it might be helpful.
Use regular Search (Cmd+F/Ctrl+F) or Search in Folder (right click on src and chose Search in Folder)
Using Excel to create the XML Structure for new fields https://success.salesforce.com/answers?id=90630000000gtheAAA
Here is the template that I use https://docs.google.com/spreadsheet/ccc?key=0Ar3Bg2QuV-_IdEtzSXBrWTZiNUZxRlRoV0tYM3RoZ2c&usp=sharing thanks to Ezra Kenigsberg - Make sure you read the notes and save this as a copy for yourself. I have modified the file to include Help Text and basic security - feel free to build on anything that I have done and let me know so that we can share it here https://docs.google.com/spreadsheet/ccc?key=0ArmEWnxyp7DvdDFpX0c2LWh4UDBlUzZtZW9wOUVUcUE&usp=sharing.
This approach uses the Metadata API or the Tooling API, so it might be handy to get to know the Salesforce API's. See Salesforce API. Also try to understand more about Salesforce's Metadata in general.
Get to know Resource Bundles in MavensMate. (see articles above).
Get to know a lot more of the shortcuts and customisations in MavensMate.
You may want to take things way further...