My Take-Away from the Community Cloud Certification Exam

So decided to sit down the Community Cloud certification as my own prerequisite goal before jumping into the Domain Architect exams. The Community Cloud certification was launched last year so very relatively new. It’s a 90 minute allocated exam with 60 questions. A bit lower at 57% passing score compared to the other Salesforce certification exams I took previously.

The questions are very scenario based and having experience setting up one or two from previous projects helps. Here are my take-aways  from the Community Cloud exam. Get familiar with the Community Cloud Certification Guide, make sure you have a good understanding of this 4 core categories – Implementation, Sharing and Security, Community Setup and the Community Builder.

Topics to focus on

  • License types and limits
  • Sharing Sets, Sharing Groups and Super User
  • Internal and External Sharing Model
  • Salesforce1 and access on a mobile browser device
  • Best template to use on a given scenario
  • Napili template functionalities
  • Self Registration, SSO and Social Sign On
  • Reputations
  • Recommendations
  • Moderation
  • Keyword List
  • Lightning Components
  • Knowledge Articles
  • Topics
  • Custom Domain and security
  • Navigation menu
  • Branding
  • Site.com studio
  • Multi Language support
  • Authenticated vs Unauthenticated(Guest) access
  • Provisioning Partner and Community users

 

Hope you find this information useful. Good luck on your preparation.

 

How to Work with Force.com Ant Migration and Git for your Salesforce Development

This tutorial shows you some techniques on using the Force.com Ant Migration toolkit for deployment and Git for version control on your Salesforce Development. Why should you learn this? This is not for all, if you are small company with only one or two developers you can get away with using change sets. That said though, on traditional software development using version control this is a best practice. Some use cases for this are, developers can work on different sandboxes and merge changes without overwriting each ones work, have a backup of the orgs metadata, do versioning for all the development changes and rollback changes if needed or incorporate continuous integration for automated testing and deployment.

After this tutorial you should be familiar with the following concepts:

  • Making changes to an org and retrieving the metadata
  • Adding changes to the a local version control
  • Pushing changes to remote repository
  • Deploying the metadata
  • Fixing deployment issues

There are 3 parts to this tutorial. The prequisites, setup and the build/deploy.


Prequisites
 – things you need to get started

  • Access to a developer edition or sandbox org
  • Any command line tool (for this tutorial I’m using the Terminal on Mac)
  • Have Java JDK installed on your machine – download and install
    • After installing you may need to update the path on your machine to point to the Java bin directory
  • Have Apache Ant installed on your machine – download here
    • Check out this earlier post on how to install and setup on a Mac
  • Git installed – download here
  • A remote repository – here are some options you can sign up for a free account at Github or Bitbucket.


Setup and configuration – 
Let’s get the ball rolling and configure everything.

  1. Ready your org credentials
  2. Download the Force.com Ant Migration Tool version that matches your org release.
  3. Unzip the archive and and it should have the salesforce-ant.jar file and a sample folder
  4. We won’t be using the sample but instead we would be using a modified version.You can clone or download from
    https://github.com/olopsman/salesforce-ant
  5. Check the folder structure.

    On the main salesforce-ant folder. The build.xml file has the project details and target build instructions when Ant is called.
  6. Go to the environment folder. Each file is named after the org. Rename the the xxxx.properties file to your org, then edit the file to enter your credentials.

  7. Open the package folder to edit the package.xml. This file will contain the metadata you want to fetch from your org.
  8. At this point you can check the setup for your Git setup is correct. Open the command line tool and navigated to the salesforce-ant folder. Add your remote repository by entering the command
    git remote add origin <your remote url>


Build/Deploy – 
let’s start the retrieve and deploy.

  1. Back on the command line tool and go to the salesforce-ant folder. To retrieve the data enter
    ant -Denv=ci1 retrieve
  2. The build.xml has special instructions that would download the metadata to temporary src copy folder and move the files to the final src folder and exclude some unwanted files that cannot be deployed.
  3. Check the changes in the src folder, at this point you would like to take a snapshot of these files and put them on version control. On the command line execute the following.
    git add .
    git commit -m "Custom messsage"
    git push origin master
  4. To deploy to the target org fix replace the env with the org credentials. Run the following command
    ant -Denv=ci2 deploy
  5. Hopefully all is successful. If not you may need to tweak the build.xml or add additional metadata to the package.xml depending on your org configuration.Here is a video in action.

Not all is smooth sailing in the land of metadata deployment. Some metadata though cannot be migrated and we continue to encounter issues after another and is one of the pain points of doing metadata deployment. Here are my takeaways from the the setup to deployment.

Issue 1:

Unable to locate tools.jar. Expected to find it in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/tools.jar

If you have existing Java SE Runtime installed instead of the Java SE Development Kit, when you run ant you would get the following output message on your console. This is because the JRE does not have the tools.jar that is only available on the JDK. Installing the JDK should remove that message.

Issue 2 :

UNSUPPORTED_API_VERSION - Invalid Api version specified on URL

This means your instance or org has not been updated with the latest release and does not match the version of the Ant migration tool. Download and older version of the Ant migration tool to fix the issue.

Issue 3 :

When Social Post is enabled on the org, the layout would&amp;amp;nbsp;be pulled from the Metadata but it cannot be deployed.
Error: layouts/SocialPost-Social Post Layout.layout -- Error: Parent entity failed to deployWith&amp;amp;nbsp;build.xml

There are metadata that cannot be deployed. As part of the build.xml we create a temporary src copy folder and copies over to a final src folder. During the copy we have instructions to exclude copying certain files. At some instance the file is referenced in a profile and could cause the profile to fail on deploy, we have regex commands to remove the node element from copying as shown below.

      <!-- Remove unwanted metadata specified on this target -->      	
	<target name="copyMetadata">
		<echo>Copying source to ${srcDir} to exclude unwanted files</echo>
		<delete dir="${srcDir}"/>
    <mkdir dir="${srcDir}"/>
		<copy todir="${srcDir}">
			<fileset dir="${srcDirCopy}">
				<exclude name="layouts/SocialPost-Social Post Layout.layout"/>
        <exclude name="workflows/Reply.workflow"/>
        <exclude name="workflows/SocialPost.workflow"/>
        <exclude name="workflows/Question.workflow"/>        
        <exclude name="settings/Search.settings"/>        
      </fileset>
		</copy>
		<!-- removes an element from profile -->
		<replaceregexp match="&lt;layoutAssignments&gt;\s*&lt;layout&gt;SocialPost-Social Post Layout&lt;/layout&gt;\s*&lt;/layoutAssignments&gt;\s*" replace="" flags="gm" byline="false">
			<fileset dir="${srcDir}/profiles" includes="*.profile"/>
		</replaceregexp>
    <delete dir="${srcDirCopy}"/>
  </target>

Issue 4 :

flows/New_Customer_Flow-1.flow -- Error: The version of the flow you're updating is active and can't be overwritten.Temporary workaround is to manually maintain&amp;amp;amp;nbsp;the flow name and version to the package.xml. The retrieveMetadata only fetches the flow version specified.

Deploying Flows is very trivial.

  • You can deploy flows if they are inactive.
  • You can deploy an active flow only if it is not active on the target org.
  • You cannot deploy an active flow if is active on the target org.

One method is to manually call the version you want to retrieve and deploy. If you encounter an error that it is already active, delete the flow, flowDefinition and remove the line in the package.xml

Issue 5: Profiles has some attributes not yet on the target org. This is specially true when your org are on different releases. Similar to removing the layout from the profile, you need regex to read off the element string pattern in the profile to remove the element.

 

 

On my next tutorial I’ll show you how to dynamically create a package.xml, deploy files that has changed between two branches and using Jenkins to automate deployment.

 

Salesforce Platform Developer II Transition Exam Take-aways

As part of my goals this year is to get the Technical Architect certification. I recently took the Salesforce Platform Developer II Transition Exam and I can say that it was fairly straightforward if you know your stuff. Having recently done the Platform Developer I transition exam last December then booked Platform Developer II exam for January. Because procrastinating is a bitch, the typical me waited till the last few days before getting serious studying.

Anyway I passed the exam. There are 35 questions, you are given 1 hour to complete. Get 63% correct and you will pass.

Here are some topics you can pay attention for your take-away

  1. Read up on the Messaging class and it’s method
  2. Implementing Continuation and when best to use it
  3. Your SOQL and SOSL queries
  4. Know your objects and data types. What are types of compound fields and how to use them in queries
  5. Testing REST and SOAP
  6. Http callouts and named credentials
  7. Advanced Currency Management
  8. When to use declarative vs programmatic features
  9. @invocablemethod and @invocablevariable annotations
  10. Lightning components
  11. Testing best practices
  12. Developer Console
  13. Apex Charts
  14. Developer Console
  15. Visualforce best practices

Preparing for the Advanced Force.com Developer Exam

I just wanted to share that I took the Advanced Force.com Developer exam and passed the first part of the test which is the multiple choice 69 question exam. The exam test your knowledge on advanced topics covering triggers, execution context, visual force pages, standard and custom controllers, running unit test, development lifecycle, data migration tools among others.

You really need to know these topics in detail and the amount of materials to study is quite a lot too. I suggest about 1-2 months to prepare for the exam.

Below are the links to the docs and guides you need read from start to finish.
1. Get the Study Guide to know the full coverage of topics for the exam
2. Download and do the tutorial for Apex Workbook to start
3. Next go over the tutorial Visualforce workbook
4. The two tutorials above should get you started. Next is download the detailed document guide Apex Code Developer’s Guide and the Visualforce Developer’s guide. Its kinda long and requires patience to finish.
5. Also covered is using the Force.com Migration Tool
6. Development Lifecycle
7. Metadata API Guide
8. Apex CheatSheet
9. And another valuable resource Study Notes
10. And ofcourse use flashcards go to StudyBlue.com

That was the resource I used to pass the first part of the exam. I’m just waiting for the programming assignment.

Got my 2nd Salesforce Certification

Been awhile since my last blog post. I’ve been very busy at work and with my personal life. Yesterday I took the Salesforce.com Certified Administrator(SU12) exam and passed it on the first try unlike my previous attempts for the Force.com Certified Developer exam.

It took me only 1 week to study for the exam and I’m sharing the resources I used for reference to others who are preparing for the exam.

1. Get the Study Guide exam outline and see the areas percentage of the questions.
http://certification.salesforce.com/SG_CertifiedAdministrator.pdf?SiteID=0DM30000000PBPx&v=5

2. Download the Official Salesforce Study Material used for the ADM 201 classes, this is old and from 2009 but still very useful.
https://dl.dropbox.com/u/424774/SFDC%20Training/ADM201_Student_Guide_slides.pdf

3. Take this 4 mockup exams from www.propprofs.com to test your knowledge, don’t worry if you fail the first time, this is only to get your feet wet on the exam mechanics. Retake the exam 2-3 while and after studying.

a. http://www.proprofs.com/quiz-school/story.php?title=salesforce-administration-test-adm201

b. http://www.proprofs.com/quiz-school/story.php?title=salesforce-administration-test-adm201-part-2

c. http://www.proprofs.com/quiz-school/story.php?title=salesforce-administration-test-adm201-part-3

d. http://www.proprofs.com/quiz-school/story.php?title=salesforcecom-certified-administrator-practice-exam

4. Review the latest 2 releases.
http://www.salesforce.com/customer-resources/learning-center/details/release-training-spring12.jsp

http://www.salesforce.com/customer-resources/learning-center/details/release-training-summer12.jsp

4. Use online Flashcards, use this to create your own Q & A questions or use those already prepared by other users.
Sign up for an account and enter your notes through the web portal, and if you have an iPad, iPhone or Android download the app and this will access the flashcards anywhere.

I used http://www.studyblue.com/

Hope you find them useful and goodluck.