Salesforce week 16

Week 16 brought my first full week budgeted at my customer and I was asked if I wanted to stay on for the rest of the year. I said “yes please!” and take it both as a pat on back for work well done as well a encouragement that I’m definitely heading in the right direction. The night I spent in Stockholm was spent on Trailhead as I really want to make Ranger. Ranger is awarded when one has earned 50k points and 100 badges. I’m well beyond the 50k points but need 20 more badges. I’m making a push to make Ranger in March. It may be a bit ambitious but it’s a goal none the less. Let’s see if I make it. Beyond that I want to start tackling additional certifications primarily Platform Developer 1 and Platform Developer 2.

Work wise the week was spent mostly prototyping two new UI’s for the customer – one for search and one for the contact record. I’ll share more next week I think. The contact layout is a drastic simplification of the built in UI which – let’s face it – IMHO is way to complex for the average user. Both the UI’s are based on Salesforce Lightning. One I mocked up inside Salesforce using Salesforce DX (loving it!!!) and the other one using Lightning Design System and Heroku. We had a session with the customer on Friday and they really liked it. Very happy.

Salesforce DX continues to be a joy to work with. The CLI makes it so much easier to work and develop using the tools I like instead of the built in web developer console. And even combining the two. A key workflow is now to write code, push to scratch org, do a couple of tweaks using point and click, pull the source back down and then “git commit”. So Nice.

//platform.twitter.com/widgets.js

Now it’s time to get cracking!

What did I learn

  • Salesforce DX still rulez the day!
  • 20 badges to go before I make Ranger
  • Kafka looks nice – already have a pet project lined up to try it out

Status after this week

Trailhead points: 79100

Trailhead badges: 80

Certifications: 5 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant, Salesforce Certified Service Cloud Consultant)

Salesforce week 15

A week with two days of travel although not going to Stockholm for a change. This weeks trip brought me to Amsterdam and our Regional Kickoff for the EMEA North region. First day was breakout sessions for the various divisions and then drinks and dinner. Day 2 was the main regional kickoff and after a mindfulness session and group massage we got started. All good fun, good information an a nice place to meet new people and colleagues. Only drawback was the hallways of the venue where the noice levels from hallway conversations really made you tired. All in all two great days with the extended team. Wednesday, Thursday and Friday was either in the home office or at the office in Hellerup. All in all a normal week – but then again not quite…

Tuesday night I joined a conference call heading home from the airport. The conference call was on the pilot program on Salesforce DX which is the new Salesforce Developer Experience. If you are working with Salesforce and haven’t heard or seen anything about Salesforce DX you have work to do. Start at the before mentioned link and then see this session (Deep Dive Into The New Salesforce Development Experience (DX) Architecture) from Dreamforce 2016 showing what it is all about.

It. Is. So. Cool!

Let me give you a bit of backstory as to why. As you may know I didn’t join Salesforce until 3,5 months ago (15 November 2016) so I’m still new to the platform. What baffled me and was about to make me pull my hair out is the fact that the *org* is the source of truth for everything. Data and code. This means that all development and customizations are done in the org using the tools provided by Salesforce. The tools are okay but the workflow is just so old school compared to moderns toolchains and workflows. Salesforce DX turns all this on its head. With Salesforce DX development is source-first, the main way you interact with Salesforce is through the CLI (command line interface) which makes scriptning easy and orgs is something you create and throw away very easily (using scratch orgs). It. Is. So. Cool.

I’ve now had the pleasure to work with Salesforce DX for two days and it is just plain awesome. I’m already using it for some prototyping for the customer I’m working for and it’s just plain awesome. I can easily control my code using git and create different prototypes in branches and easily deploy to scratch orgs for testing. So nice. I’ll definitely be blogging more about Salesforce DX when I get an official “go ahead”. It’s a public pilot but want to air on the side of caution. Say tuned.

What did I learn

  • Salesforce DX rulez the day!
  • The gym at Hilton in Amsterdam can make most gyms jealous
  • Lightning grows more potent by the day
  • Did I mention Salesforce DX rulez the day?!

Status after this week

Trailhead points: 74000

Trailhead badges: 75

Certifications: 5 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant, Salesforce Certified Service Cloud Consultant)

Salesforce week 14

Short week as I had Thursday and Friday off – or PTO as we call vacation. But a great week. Monday and Tuesday I spent on-site in Stockholm and Monday night I finally got my act together and took the final certification exam of my onboarding and I’m very happy to report that I passed. Yay!! I now have passed all the 5 certifications I needed to pass. #happyDays

It was also my first week of being billable at the customer which was great. Wednesday was spent in the home office. All good stuff!

A thing I find myself doing more of is explaining the Salesforce fundamentals to people internally. Whether the job role is Success Manager, Account Executive, Project Manager or so on we (us at Salesforce) basically all have a requirement to pass at least the test for Salesforce Certified Administrator. This of course yields loads of questions from non-technical people as they simply do not have the same basic understanding of core fundamentals and a skeleton to hang their knowledge on if you will. So I’m using my ability to explain some of these things in very simple terms and answer questions. This is something I really like and I find that I learn more about the platform by having to explain it to people.

What did I learn

  • If you doubt whether you can pass an exam go for it!
  • You learn a lot by teaching a platform
  • There is some joy to actually being billable

Status after this week

Trailhead points: 71150

Trailhead badges: 72

Certifications: 5 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant, Salesforce Certified Service Cloud Consultant)

Salesforce week 13

Last week I spent two days at the customer site in Stockholm and 3 days at home in the home office. I think. Cannot really remember. Maybe I was in the office one of the days. Oh well 🙂 It’s starting to become normal to go to Stockholm and family life and work life is starting to work out. It seems like it will work for us. Customer project wise I almost finished the Lightning Component I’ve been working on for the customer and even made small changes to also make it work in Salesforce1. With both the web UI and the mobile UI being based off the same technologies make that pretty easy to do. Of course there are still things to address but they are mainly to do with the inherit difference in how users work on mobile vs on a desktop.

I actually thought I was done with the component last week but then I realized that writing test cases are required to deploy code into Salesforce. An org code coverage percentage of 75% is required. So this week I’m going to write the test cases for the server side controllers (written in Apex). One of the things which has been fun is that it’s very different writing code for production release than writing for the sandboxes or exercises I’ve been doing otherwise. For one normal coding practices like documentation and comments are way more important but also things which is less obvious start rearing its head. Security for one… I suddenly had to stop and consider object and record access for the custom objects I use for the solution. For this solution it wasn’t a big issue but one of those things that isn’t necessarily required for a PoC / sandbox implementation.

I’ve also started to figure out how to bundle up my solution into “something” I can deploy easily across the various orgs we use at the customer. For now it’s a bit of a kludge using the Apache Ant functionality by Salesforce. It will lukily become way better soon then new Salesforce DX approach become publicly available. If you do not know what Salesforce DX is stay tuned but in short it will turn the whole Salesforce development experience on its head. From the org being the source of truth to being based on a source-first approach so that your source repository becomes the source of truth and all development and deployment runs from the source to the org and not the other way. It looks very promising.

What did I learn

  • The Salesforce Ant extensions are fine to work with but still feels like a bit of a kludge
  • There are CLI extensions for Salesforce but they are not really ready for production use
  • Salesforce DX looks to be the solution I’ve been looking for
  • There is a difference between developing for a sandbox and a production org – remember to write those test cases

Status after this week

Trailhead points: 71150

Trailhead badges: 72

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

Lightning Components as Quick Actions in Salesforce1 and padding

Since Winter 17 we have had the option of using a Using Lightning Component as a Quick Action. In the Lightning Experience in a desktop browser the component is shown as a popup (actually a lightbox) in the UI and in Salesforce1 (the Salesforce mobile app) it’s more of a modal fullscreen dialog. All this is great. Only thing you have to do is to make your component implement force:lightningQuickAction (all declaratively) and it can be added as a Quick Action. The resulting lightbox / dialog will have a header with the action name and a default Cancel button to close the dialog. Again great but what if you want to name the button something else? Or if you need a custom header? Well there is another interface for this called force:lightningQuickActionWithoutHeader. So far so good. The issue is that while this removes the default header and buttons it doesn’t quite cut it in Salesforce1 as the container will still add a default margin around the component. Bummer…

The only way I found to fix this in the component I’m doing now is to add a negative martin on the component itself thereby hacking the UI. The added style is in bold – there is a negative margin to push the UI out of bounds to appear at 0,0 and a width and a height to make sure the header bar looks correctly. I’ve reported this internally and I hope someone will come up with a fix e.g. a new interface to add this explicitly.

<aura:component implements="force:hasRecordId,force:lightningQuickActionWithoutHeader">
    
style="margin: -20px 0 0 -20px; width: 120%; height: 50px"> Back Contact Sync
UI body...
</aura:component>

Salesforce week 12

Week 12 brought me to Stockholm for 3 days, had 1 day in our new shiny Salesforce office in Hellerup (closer to Copenhagen center) and 1 day working from home. I spent most of the week getting up to speed on Salesforce Lightning and developing mockups for a custom component for the customer. All in all it was a great week where I learned a lot and made significant contribution to the customer project although I’m not officially assigned and billable yet (I’m shadowing).

Salesforce Lightning components are very nice and the component framework is cool although it is also pretty obvious in some areas that it’s new and there are round edges to be considered. Custom Lightning Components can be used in many places but unfortunately there are still areas where they cannot be used so workarounds are needed. Also building custom components can both be done from the supplied Lightning UI widgets and custom markup. For now most of what I’m doing resorts to combining custom markup with Salesforce Lightning Design System (SLDS) – I will have to see how much can and should be done using the built in components.

Much more to learn in the time to come.

Sunday it was time for Super Bowl and my New England Patriots came from behind to overcome a 25 deficit to win by 6 in overtime. What a great game!! Not much sleep but there is always coffee 🙂

What did I learn

  • Lots about Salesforce Lightning, Lightning Component and the Salesforce Lightning Design System (SLDS)
  • There are wicked many CSS classes in SLDS
  • Stockholm is a nice city
  • Patriots performed the biggest ever comeback in NFL history to close a 25 points gap to win by 6 in overtime

Status after this week

Trailhead points: 70400

Trailhead badges: 70

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

Salesforce week 11

First week on “the job” brought me to the customer I’ll most likely be assigned to in Stockholm. I spent Tuesday to Thursday there and have already delivered something that will go into production in a couple of weeks. Both exciting and scary… The week was basically spent learning about the project, the phases, deliverables and a whole slew of new terminology. All good stuff. Nothing much else to report for now besides Stockholm being a nice city.

What did I learn

  • Some customers actually use Salesforce Lightning
  • What’s it’s like being thrown in mid-project
  • That I will stay at 3 different hotels in Stockholm over the next weeks

Status after this week

Trailhead points: 70400

Trailhead badges: 70

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

Salesforce username/password OAuth flow against a sandbox

We had issues today because our OAuth password flow wouldn’t work against one of our sandboxes although the code worked against production. Instead we got this error:

{"error":"invalid_grant","error_description":"authentication failure"}

After Googling and finding this thread it turned out that when using the username/password flow against a sandbox you have to either relax IP restrictions for login or authenticate against test.salesforce.com instead of login.salesforce.com (which of course makes sense).

Below is curl commands for using the username/password flow against a sandbox:

$ curl -d "grant_type=password 
   &client_id=3MVG9X0_oZyBSzHrnzENlR...JSDz0_MiwxyieREuBhtgZJrF7Lzx8542TFpU_ 
   &client_secret=6235860963257688256 
   &username=mikkel.heisterberg%40example.com.sandboxname 
   &password=Passw0rd.SecurityToken" https://test.salesforce.com/services/oauth2/token
{"access_token":"00D6E000000Cpmu!AQ0AQIj4...cGCRqmNnYc6dmgLT09VNoIFXJtHvsPGLqrBs0VlK",
   "instance_url":"https://someaddress.my.salesforce.com",
   "id":"https://test.salesforce.com/id/00D6E000000CpmuUAC/0056E000000OCcCQAW",
   "token_type":"Bearer","issued_at":"1485850119972","signature":"malODIaSULh1siHzdw...pHKjBpWoQcm66UQ="}

$curl -H 'Authorization: Bearer 00D6E000000Cpmu!AQ0AQIj4...cGCRqmNnYc6dmgLT09VNoIFXJtHvsPGLqrBs0VlK' 
   https://test.salesforce.com/id/00D6E000000CpmuUAC/0056E000000OCcCQAW
{"id":"https://test.salesforce.com/id/00D6E000000CpmuUAC/0056E000000OCcCQAW",
   "asserted_user":true,"user_id":"0056E000000OCcCQAW","organization_id":"00D6E000000CpmuUAC",
   "username":"mikkel.heisterberg@example.com.sandboxname","nick_name":"mheis",
   "display_name":"Mikkel Heisterberg","email":"mheisterberg@foo.com","email_verified":true,"first_name":"Mikkel",
   "last_name":"Heisterberg","timezone":"Europe/Paris","photos":{"picture":"https://someaddress.content.force.com/profilephoto/005/F",
   "thumbnail":"https://someaddress.content.force.com/profilephoto/005/T"},"addr_street":null,"addr_city":null,"addr_state":null,
   "addr_country":null,"addr_zip":null,"mobile_phone":"+45 12345678","mobile_phone_verified":true,"status":{"created_date":null,
   "body":null},"urls":{"enterprise":"https://someaddress.my.salesforce.com/services/Soap/c/{version}/00D6E000000Cpmu",
   "metadata":"https://someaddress.my.salesforce.com/services/Soap/m/{version}/00D6E000000Cpmu",
   "partner":"https://someaddress.my.salesforce.com/services/Soap/u/{version}/00D6E000000Cpmu",
   "rest":"https://someaddress.my.salesforce.com/services/data/v{version}/",
   "sobjects":"https://someaddress.my.salesforce.com/services/data/v{version}/sobjects/",
   "search":"https://someaddress.my.salesforce.com/services/data/v{version}/search/",
   "query":"https://someaddress.my.salesforce.com/services/data/v{version}/query/",
   "recent":"https://someaddress.my.salesforce.com/services/data/v{version}/recent/",
   "profile":"https://someaddress.my.salesforce.com/0056E000000OCcCQAW",
   "feeds":"https://someaddress.my.salesforce.com/services/data/v{version}/chatter/feeds",
   "groups":"https://someaddress.my.salesforce.com/services/data/v{version}/chatter/groups",
   "users":"https://someaddress.my.salesforce.com/services/data/v{version}/chatter/users",
   "feed_items":"https://someaddress.my.salesforce.com/services/data/v{version}/chatter/feed-items",
   "feed_elements":"https://someaddress.my.salesforce.com/services/data/v{version}/chatter/feed-elements",
   "custom_domain":"https://someaddress.my.salesforce.com"},"active":true,"user_type":"STANDARD","language":"en_US","locale":"en_US",
   "utcOffset":3600000,"last_modified_date":"2017-01-26T13:49:33.000+0000","is_app_installed":true}