Another Salesforce blog about Salesforce stuff

I recently downloaded MavensMate for the Atom text editor, since it supports development of Lightning Component bundles so that I can get them into source control. After downloading these tools though, I’ve seen some issues when you have an existing force.com project locally (non-MavensMate), but you want to create a MavensMate Project from that repository. In Mavensmate […]

In the Lightning Component docs, they tell you to use the following “c.” syntax when you want to reference the Javascript controller method from the component view: <ui:button label=”Click” press=”{!c.doJSMethod}” /> also in the docs, they show you how you can call an Apex method from the Javascript controller using the exact same notation: var […]

If you want to create your own logout button for a Community Lightning Component, you can use the window.location.replace() javascript function. The button component (note: this example is the button only, you would typically include this in a Notification): <aura:component implements=”forceCommunity:availableForAllPageTypes” access=”global”> <ui:button label=”Logout” press=”{!c.logout}”/> </aura:component> And in your controller, you can redirect the user […]

If you are using the Napili template in Salesforce’s Community Builder, you know that they create a pretty standard header for your site that includes your company logo, the global search bar, and a navigation widget. You can choose in Settings to hide the entire header all together (if you want to make your own), […]

More importantly… I learned how to initialize Lightning Components from properties in an Apex Controller. My scenario: I wanted to display the detail page for a Contact in a lightning component. Essentially the equivalent of “<apex:detail>” tag. In Lightning, you can achieve this by using the “<force:recordView>” tag instead. What I learned is that the […]

When you’re using an <aura:attribute> that is an instance of a custom Apex Class, you need to use the following approach: Any methods in your class that you want to access from client-side logic must be declared as Static the @AuraEnabled annotation must be used on those methods as well Any properties of the class […]

So I’ve decided to start adding a new type of blog post to this site in an effort to stay more consistently engaged with it (I’ve been slacking and not paying as much attention to it as I would like). I’m going to start posting Today I Learned (#TIL) posts in addition to the regular […]