1
Salesforce for Domino Dogs
#engageug
2
Who are we – Paul Mooney
#engageug
• Senior Architect, Bluewave Technology• Did a lot of Domino Admin stuff
• For 15 years or so
• Certified Salesforce• Administrator• Advanced Administrator• Developer (Yes – I know… mental)• Service Cloud Consultant• Sales Cloud Consultant• Instructor
• Spoke at a lot of things over the years• Mostly sober
3
Who are we – Mark Myers• Member of the London Developer Co-op
• Co-writer of LDCVia http://www.ldcvia.com
• IBM Connections, Domino, Salesforce and Web development
• Hire me!• Developer from a support background• 14+ years on Domino, 17+ years in IT• Speaker at 6 x Lotuspheres/Connects, 6 x
UKLUGs, 1 x ILUG (A very drunk one), 4 x BLUG/Engage
#engageug
4
What’s this session about?
“All software sucks”-Paul Mooney, 2014
“Some of the time”-Mark Myers, 2014
#engageug
5
Salesforce…
Totally different architecture to Domino
…with many similarities
#engageug
6
Quick overview of Salesforce
#engageug
7
• 16 years old
• 180,000 customers
• 2.8 million users
• Forbes most innovative company 2011, 2012, 2013, 2014, 2015
• New release for all customers three times a year#engageug
8
• 17 Languages natively supported
• Global translation capability for content and custom application design
• Fully accredited Safe Harbour Trust for EU
• ISO27001 compliance certified
• Staff doubled in past year (8000 employees)#engageug
9
2015 Gartner Magic Quadrant
#engageug
10
All these clouds…
#engageug
11#engageug
Trusted Cloud Infrastructure
Customer Success Platform Services
Shared Data Shared Workflow Shared Reporting Shared Collaboration Shared IdentityShared
APIs
AnalyticsCommunityMarketingServiceSales Apps
12#engageug
13
It’s not a mail server(It does fully integrate with Outlook, O365, Google Apps, Lotus Notes etc)
#engageug
An administrator is not an administratorThere are no servers – Administrators ontop of managing/
integrating tend to Declaratively (click) develop)
14
Where things are similar…
#engageug
15
User Management
• Users (user account)• Groups (To group users)• Policies (Control functions)
#engageug
• Users (user accounts)• Groups (To group users)• Profiles (Control functions)• Permission Sets
• (granular control of functions)
16
Security Levels
• Authentication Level• Server Level• Database Level• Record Level• Field Level
#engageug
• Authentication Level / License
• Organization Level• Profile Level• Record Level• Field Level
17
Databases and declarative design
• Databases• NoSQL based tables• Fields• Forms• Views• XPages
#engageug
• Apps/Objects• Relational• Fields• Layouts/Record Types• Views• VisualForce/Lightening Pages
18
More on objects, fields
#engageug
• Standard objects – fully functional pre built tables• Can be completely customised/altered as needed• You ALWAYS alter them• You cannot delete them, but do not have to use them
• Standard fields – built for you in standard objects• Can be altered to a point• You cannot delete them, but you can hide them
• Custom Objects – create your own tables / apps• Custom fields – create your own fields
• End in __c. 400 fields per object limit
19
Salesforce Development Components
#engageug
20
Salesforce Development Components
#engageug
Noord Brabantlaan 1A, 5652 LA Eindhoven
21
Fields
• Field types• Validation rules• Formulas• Conditional rules• Agents
#engageug
• Field types• Validation Rules• Formulas• Conditional rules• Process builder / Triggers• Approval processes
22
Types of fields in Salesforce• Auto Number• Formula• Roll Up• Lookup• Master Detail• External Lookup• Checkbox• Currency• Date
#engageug
• Date/Time• Email• Geolocation• Number• Percent• Phone• Picklist• Multi value
Picklist
• Text• Text Area• Text Area (Long)• Text Area (rich)• Encrypted• URL
23
Formula fields…
#engageug
24
Agents are process builder
#engageug
25
Internal Release methodology
#engageug
• Sandboxes and change sets• Templates and design replacing
26
Mobile Development
Salesforce1
#engageug
27
Similar problems that can be solved
• Poor design possible• Poor release management• Too many rights (changing
stuff in production)
#engageug
• Poor design possible• Poor release management• Too many rights (changing
stuff in production)
28
Salesforce Development Consists of 2 Types
#engageug
• Declarative (Point-And-Click)• Simple.• Fast.• Easy.• Upgrades don't break your apps.• Does not require programming skills.
• Programmatic (Apex / Visualforce / API) • Finer Control.• Flexibility.• You can expand capabilities to match User demands.
29
How Salesforce Dev is the same as Domino Dev• Due to fast version iterations Salesforce is about the
same age as Domino feature wise so it is full of poorly documented quirks and artefacts.
• User behaviour is like the golden days of Notes Dev, your users will add fields and bits into the live design meaning your dev environment is out of date.
• New Design elements keep being created as the “next big thing”
#engageug
30
How Salesforce Dev differs from Domino Dev• Online only (though you can have sandboxes).• Clever hacks to provide users with what they want are
NOT supported by Salesforce.• “we do not support javascript”
• Never sure how much of your existing code each new version of Salesforce will break.
• (Paul Edit. This was Mark’s fault)
#engageug
31
The are 5 Golden Rules to Salesforce development
#engageug
32
Golden Rules1) Salesforce Cares more about their platform than your
code.2) Salesforce Cares more about their platform than your
code.3) Salesforce Cares more about their platform than your
code.4) Salesforce Cares more about their platform than your
code.5) Salesforce Cares more about their platform than your
code.
#engageug
33
Golden Rules1) Think of all database actions in terms of Batches.2) Crude code scales VERY poorly and hits hard
salesforce limits.3) Salesforce feels like a Document based system, but
under the covers it’s a classic Relational database system.
4) Write your tests at the same time as your code, its quicker that way.
5) Keep up to date with what the platform is doing (not doing so costs you money and makes you look silly)
#engageug
34
Batches – BAD!• In Notes you tend to
write to disk on every iteration on a document loop
• In Salesforce this will fail validation when you attempt to promote to live
#engageug
for(Integer i=0; i<25; i++) { Case ct = new Case( Priority = '1 - Critical', Status = 'Logged', Resoloution_Sub_Category__c = ''); insert ct;
}
35
Batches – GOOD!• Save up all your
transaction and at the end of the Loop write them to the database.
#engageug
List<Case> cases = new List<Case>();for(Integer i=0; i<25; i++) {
Case ct = new Case( Priority = '1 - Critical', Status = 'Logged', Resoloution_Sub_Category__c = ''); cases.add(ct);
}
insert cases;
36
Limits• Sales force has a number of hard limits that can be just as
annoying as the notes 32K limit but are there to protect the platform
• SOQL Limits are 50,000 records per statement (1,000,000 in read only mode)
• No more that 15 SOQL statements in a given function• APEX run time out 10 Seconds (standard synchronous calls). • List object cant hold more than 1000 objects.• More Limits: https://developer.salesforce.com/docs/atlas.en-
us.apexcode.meta/apexcode/apex_gov_limits.htm
#engageug
37
Testing• To promote code from a Sandbox to Production 75% of
your code needs to be reachable via a test class • You can see your code coverage level from the developer
console
#engageug
38
Testing – Developer Console.
#engageug
Code that is covered by tests
Code that is not Tested
39
Keeping up to date
“All certified professionals are required to maintain their certification by taking a maintenance exam every release cycle.” “Release cycles are about four months in length”
“If you do not pass the release exam by its deadline, all credentials maintained by that exam will expire, or in some cases become suspended. “
#engageug https://help.salesforce.com/HTViewSolution?id=000186547
40
Quirks
#engageug
41
Fun Quirks
#engageug
• Cases are kept in the “Case” table, Accounts are kept in the “Account” table etc etc…. Products are kept in the “Product2”
• To lookup a standard field • To get value: case.account• To get relationship value: case.account.Name
• To lookup a custom field• To get value: case.customaccount__C• To get relationship value: case. customaccount__R.Name
42
Renaming Stuff• All code is checked
for dependencies, if you try and rename an object or attribute and it is used else where you will be stopped.
#engageug
43
Tips for Actually Developing
#engageug
44
Top Tips.• Stop your users updating live while you are writing new
Updates (and make sure your sandboxes are up to date)• Keep a note of every element you change as it makes it
easier to build your Outbound Change Sets.• Cater all your code to run on millions of records.• Invest in a good alternative Code editor
#engageug
45
Code Editors - Alternatives• Atom
• My Preferred text editor• Integration plug in https://atom.io/packages/mavensmate-atom
• Subline• Well thought off and excellent editor
• Great plugin for salesforce integration https://github.com/mailtoharshit/Weave#installation
• Eclipse• The original IDE for salesforce, but I have seen very few people actually
use it recently and a lot of complaints on the forum.
#engageug
46
Questions?
#engageug