I wrote some (a lot of) words on my somewhat circuitous path to becoming a Salesforce developer. As someone who didn’t go to university in a STEM field I felt it was important to share how I was able to acquire the skills I needed achieve this. You can read it here.
I am lucky enough to have had the opportunity to take some Salesforce Developer training this week. I attended Programmatic Development Using Apex and Visualforce (DEV-450) here in London, a 5 day course intended to teach the fundamentals of Apex and Visualforce to developers.
As someone who has worked with Salesforce for the better part of 6 years, I was excited to take the next step in my developer career path. My instructor, Simon Goodyear, was a Salesforce MVP and really knew his stuff. Did I expect anything different? No. But it was really nice to have someone who you could ask anything and was able to give a coherent, informed and easy to understand answer.
The content of the course was largely as described in the title focusing on Apex and Visualforce for development. The first half day covered a lot of platform fundamentals around sharing, security and declarative automation tools. I’ve spent lots of time on these topics in my various roles and felt the brief touch on them was appropriately short for my needs.
Though much of what we covered throughout the rest of the week are topics that I have a an understanding of, I never felt like I was wasting time. We talked a fair amount about object relationships for example and though they are fundamental part of working in the Salefsforce ecosystem and something I use on a daily basis, I feel I strengthened and solidified my grasp on some of the finer points. This wasn’t unique to relationships. Generally speaking as the week went on, I knew less and less of what we were learning. As such, I think the advances in my Visualforce knowledge, which we didn’t get to until Thursday and Friday, will be broader than that what we worked on earlier in the week like relationships but perhaps not as deep.
I am excited to take the Salesforce Platform Developer I certification in the next few weeks. Though not advertised explicitly as such, this course is intended to cover a lot of what one will see in that certification and after discussing with my instructor, I feel ready to tackle the cert! For those who don’t have much general development experience, this was certainly a fast moving course and could possibly pass some by. I have varied development experience in Ruby and VBA. Along with my extensive Salesforce administrator experience, I feel I was an ideal candidate to take this course.
Stay tuned for my next post where I dive in to a little more detail about the content of the course.
Record types in Salesforce play a large part in its declarative development. Their primacy in the platform make them particularly useful and important. Just like many other records, the record type id can be very useful. Unlike the record ids for standard and custom objects like contacts and accounts, however, record type ids can be more difficult to obtain.
IDs in the URl
You CAN indeed obtain record type ids like other ids within a Salesforce URL. For a standard object, navigate to Setup>Customise>[object]>Record Types. For custom objects, navigate to Setup>Create>Object>[object]. Click on any record type and then look at the URL. It might be easier to copy and paste the URL into a text editor.
Within the URL there will be a question mark. This question mark signals the beginning of the URL parameters. The record type’s id is listed as the ‘id’ parameter.
Beyond serving as a way to differentiate page layouts based on user profiles and a way to present different picklist values to an end user, record type ids are very useful when performing SOQL queries.
[How to get record type ids via SOQL]
ids obtained via Soql
For those of you with limited experience using SOQL, the act of creating a SOQL query can be intimidating. Using SOQL to obtain a record type id, however, is relatively simple and hopefully this will give you the confidence to explore other ways in which querying data like this can be useful.
There are many ways to invoke a SOQL query in the Salesforce universe. I’m going to use the Developer Console in this instance as it’s available in all Salesforce editions and is quite simple. Open up the Developer Console by clicking on the down arrow next to your name and selecting ‘Developer Console’ from the menu. It’s possible that if the Salesforce org you work in is several years old that you may have to click on the down arrow next to ‘Setup’ instead. Either way, open up the Developer Console.
Within the Developer Console itself, select the ‘Query Editor’ tab and in the blank space below, type in the following query and hit ‘Execute’
SELECT Name, Id, sObjectType FROM RecordType
A list of ALL record types for ALL objects in your org should appear. As you can see, record type itself is just one big table in the database. Do you want to only list those for Account? Or perhaps you know the exact name of the record type whose Id you need. I’ve included SOQL queries below that utilise the ‘WHERE’ clause and allow you to refine your search to exactly what you need.
SELECT Name, Id, sObjectType FROM RecordType WHERE sObjectType = 'Account'
SELECT Name, Id, sObjectType FROM RecordType WHERE Name = 'My Favourite Record Type'
Record types are a fundamental building block in the Salesforce environment and the use of their ids is becoming more and more essential in declarative development. I hope this gives you the tools you need to access those ids and create high quality applications on the Salesforce platform.
rel='me' attributes to the links in my navigation menu. Step one in the indiewebification of this site. Yeah!
If, more generically, you’re curious as to how to one would go about adding attributes a WordPress menu item, may I point you in the direction of a few resources. Here’s your man, Neil Gee, laying it out pretty simply. Essentially, you create a function in your theme’s functions.php file that returns the attributes that you want to add. You then call that function using the
add_filter() function and voila.