mbf2 salesforce webinar 2
TRANSCRIPT
![Page 1: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/1.jpg)
More Salesforce MBF2 – Salesforce Webinar
![Page 2: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/2.jpg)
Peter Chittum Developer Evangelist
Salesforce @pchittum
github.com/pchittum
Raouf Aimeur Principle Solution Engineer
Salesforce
![Page 3: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/3.jpg)
Safe Harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal quarter ended January 31, 2015. This document and others are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
![Page 4: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/4.jpg)
Reminders
![Page 5: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/5.jpg)
Sign in for a DE account :
1- developer.salesforce.com/signup
2- Fill out the form
Username must be unique
Create a Force.com Developer Edition account
![Page 6: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/6.jpg)
How to create a free Heroku account ?
Sign in for an account :
1- www.heroku.com/
2- Click Sign Up in the upper right corner
3- Fill out the form
![Page 7: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/7.jpg)
Learning Force.com and Heroku
Salesforce Trailhead Online Learning developer.salesforce.com/trailhead Many more resources at: developer.salesforce.com jr0cket’s Heroku Tutorial agileforce.co.uk/heroku-workshop/ Many more resources at: devcenter.heroku.com
![Page 8: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/8.jpg)
Projects Basics
![Page 9: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/9.jpg)
Set Up Your Org for Development
§ Session and Password Settings
§ Developer Login IP Whitelist
![Page 10: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/10.jpg)
IDE Options
§ Eclipse IDE: Plugin by Salesforce https://developer.salesforce.com/page/Force.com_IDE
§ Sublime Text 3: Plugin by MavensMate http://mavensmate.com/
![Page 11: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/11.jpg)
Local Project Artifacts
src
MyObject__c.object...
MyApexClass.clsMyApexClass.cls-meta.xml...
classes (code)
objects (data model)
package.xml
![Page 12: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/12.jpg)
Save from IDE
§ Automatic on local Save
§ Code is Compiled at Server
§ References Checked
![Page 13: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/13.jpg)
Deploy to Different Environment
§ From IDE
§ Package
§ workbench.developerforce.com
Test/Prod
Dev
![Page 14: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/14.jpg)
Retrieving Data
![Page 15: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/15.jpg)
Data Model and the Force.com Platform
§ sObject: – Table-like data structure
• Records
• Fields
– Extensible
– Queryable/Updatable
– Relationships
§ Automatic Features: – User Interface
– Security • CRUD
• Field-level
• Record-level (ACL)
– REST & SOAP APIs
– Mobile
![Page 16: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/16.jpg)
Standard Data Model
§ Standard Objects – Account
– Contact
– Lead
– Opportunity
– Case
– …
§ Standard Fields – Id
– Name
– CreatedBy/Date
– LastModifiedBy/Date
– OwnerId
– IsDeleted
– …
![Page 17: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/17.jpg)
Extensible Data Model
§ Custom Objects – Workshop__c
– Room__c
– …
§ Custom Fields – Status__c
– Type__c
– Start_Time__c
– End_Time__c
– …
![Page 18: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/18.jpg)
Relationships: The Predefined Join
§ RDBMS – Join at runtime
with SQL or view
§ Force.com – Predefined join
at design-time
– Similar to integrity constraints
![Page 19: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/19.jpg)
Master-Detail Lookup
Relationship Types
Never Optional
Cascade Clear Field/Block/Cascade*
Nullability
Delete Behavior
Child Inherits from Parent Independent Parent/Child
2 25
Record Sharing Access
Max Allowed Fields
![Page 20: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/20.jpg)
Demo Use Case: – Workshops and Rooms
![Page 21: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/21.jpg)
SOQL
§ Salesforce Object Query Language
§ SQL-like syntax
§ Queries the Force.com Object Layer
§ Used in: – Apex
– Developer Tools (Developer Console, Eclipse, Workbench, …)
– API (REST, SOAP, Bulk, …)
![Page 22: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/22.jpg)
From SQL to SOQL
§ At first may look familiar
§ Important differences
§ Learn the differences
§ Use good data design practices
![Page 23: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/23.jpg)
From SQL to SOQL: The Familiar Bits
§ Table-like structure
§ Similar query syntax
§ Indexed
§ Transactional
§ Triggers
SELECT Id, Name, Capacity__c FROM Room__c WHERE Capacity__c > 10
![Page 24: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/24.jpg)
From SQL to SOQL: Immediate Differences
§ No select *
§ No views
§ SOQL is read-only
§ Limited indexes
§ Object-relational mapping is automatic
§ Schema changes protected
![Page 25: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/25.jpg)
From SQL to SOQL: Differences To Learn
§ sObjects are not actually tables – multi-tenant environment
§ Relationship metadata – Management of referential integrity
– Predefines joins
– Relationship query syntax
§ Query usage explicitly metered – API Batch Limits
– Apex Governor Limits
![Page 26: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/26.jpg)
The __c and __r Suffixes
Room__c
Workshop__c Id
Id
Room__c
Room__r
Workshops__r Type: List<Workshop__c>
Type: Id
Type: Room__c
1-M
![Page 27: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/27.jpg)
Relationship Query: Child to Parent
SELECT Id, Name, Room__c, Room__r.Id, Room__r.Capacity__c
FROM Workshop__c WHERE Status__c = ‘Open’
[ { "Id": "a0145000000aBf4AAE", "Name": "Yoga for Beginners", "Room__c": "a00vn000000dU3dAAE", "Room__r": { "Id": "a00vn000000dU3dAAE", "Capacity__c": 10 } }, { "Id": "a0145000000aBf4AAE", "Name": "Yoga for Beginners", "Room__c": "", "Room__r": {} }, ... ]
![Page 28: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/28.jpg)
Relationship Query: Parent to Child
SELECT Id, Name, (SELECT Id, Status__c FROM Workshops__r) FROM Room__c WHERE Capacity__c > 10
[ { "Id": "a00vn000000dU3dAAE", "Name": "Salon 1 West", "Workshops__r": [ { "Id": "a0145000000aBf4AAE", "Status__c": "Open" }, { "Id": "a0145000000aBd4AAE", "Status__c": "Full" } ] }, ... ]
![Page 29: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/29.jpg)
Querying for Intersection
Select Id, Name, Room__r.Name, Room__r.Capacity__c FROM Workshop__c WHERE Room__r.Capacity__c > 8
[ { "Id": "a0145000000aBf4AAE", "Name": "Yoga for Beginners", "Room__c": "a00vn000000dU3dAAE", "Room__r": { "Id": "a00vn000000dU3dAAE", "Capacity__c": 10 } }, {...}, ... ]
![Page 30: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/30.jpg)
Aggregate Queries
SELECT COUNT(Id) rmCount, MAX(Capacity__c) maxRmCap, Configuration__c FROM Room__c GROUP BY Configuration__c
[ { "rmCount": 4, "maxRmCap": 6, "Configuration__c": "Classroom" }, { "rmCount": 2, "maxRmCap": 10, "Configuration__c": "Theatre" }, ... ]
![Page 31: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/31.jpg)
Demo Use Case: – Find a tally of empty spaces
being held for workshops that are not actively enrolling delegates
![Page 32: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/32.jpg)
Heroku and Salesforce
![Page 33: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/33.jpg)
Heroku Resources
§ Create a simple Java App
agileforce.co.uk/heroku-workshop
§ node.js sample App
github.com/jeffdonthemic/node-nforce-demo
![Page 34: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/34.jpg)
Mobile SDK
![Page 35: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/35.jpg)
Single Platform
Multiple Platforms
Native Advanced UI interactions
Fastest performance App Store distribution
Hybrid Web developer skills Access to native platform App Store distribution
Full Capability
Partial Capability
HTML5 Web developer skills Instant updates Unrestricted distribution
![Page 36: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/36.jpg)
Mobile SDK Guide
§ Mobile SDK
developer.salesforce.com/mobile
![Page 37: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/37.jpg)
Questions
![Page 38: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/38.jpg)
Thank You
![Page 39: Mbf2 salesforce webinar 2](https://reader034.vdocuments.us/reader034/viewer/2022042701/55a64da31a28abfc028b483d/html5/thumbnails/39.jpg)
Appendix