SlideShare uma empresa Scribd logo
1 de 32
Coding techniques that keep your
admins happy
Writing configurable code in Salesforce
Roy Gilad, Israel Salesforce DUG, Leader
Conduit Mobile, CRM Solutions Manager
@RoyGilad
Roy Gilad
Israel Salesforce DUG Leader
CRM Solution Manager, Conduit Mobile
@RoyGilad
All about Conduit Mobile
Award-winning, DIY app-creation platform, providing
publishers with a one-stop shop for engaging users on the
go and growing their business on mobile
 One-click creation of custom-branded mobile apps and sites
 Over 160,000 apps created; more than 1,000 new apps each day
 Specialized features for different business verticals: small
businesses, restaurants, events, education, and more
 End-to-end solution: app creation, submission to app marketplaces,
promotional tools, content management, and advanced analytics
Coding techniques that keep your admins happy

What is this session
about?
DRY principle
Don’t Repeat Yourself:

“Every piece of knowledge must have a single, unambiguous,
authoritative representation within a system”
Coding techniques that keep your admins happy
In this presentation we will cover:

Custom Labels

Field Sets

Custom Settings
Custom Labels
Custom Labels
What is it?
 Custom labels are custom text values that can be accessed from
anywhere:
 Apex classes
 Visualforce pages
 Formulas
 Validation rules
Custom Labels
Why should we use it?
 Text to be maintained by a system administrators.

 DRY: Reuse and consistency throughout the organization.
 Code readability.
 Multi-lingual support.
Custom Labels
Where can we find them?
 Setup-> Build -> Create -> Custom Labels
Custom Labels
Demo
Custom Labels
Where should we use it?
 Text in pages

 Error messages in triggers
 When you have multi-lingual org – A MUST!
 Place-holder for repeated string in your code.
Custom Labels
How to use them?
 Apex:

 System.Label.Label_name
 Visualforce:

 {!$Label. Label_name}
 Formula and validations:
 $Label. Label_name
Field Sets
Field Sets
What is it?
 Set of fields in an object that can be used dynamically in
Apex and in Visualforce pages.

 Field sets are a powerful tool when you have a number of
fields used in the same operation, or in the same context.
Field Sets
Why should we use it?
 Pages and integrations can be controlled by a system administrators.

 DRY: Reuse and consistency throughout the organization.
 Code readability.
Field Sets
Where can we find them?
 Can be defined for any object:
• In standard objects it can be found under the object name:
• In custom objects it can be found as a related list in the object:
Field Sets
Demo
Field Sets
Where should we use them?
 Visualforce pages and controllers.

 Fields that are sometimes presented and updated together.
Field Sets
How to use them?
 Visualforce pages:
• {!$ObjectType.Account.FieldSets.FieldSetName}

 Apex:
• SObjectType.Account.FieldSets. FieldSetName.getFields()
Custom Settings
Custom Settings
What is it?
 Similar to custom objects.

 Enable developers to create custom sets of data.
 Enable to create and associate custom data for an
organization, profile, or specific user.
Custom Settings
Why should we use it?
 Access dictionary tables without querying.

 Can provide Profile-specific and User-specific tables.
Custom Settings
Where can we find them?
 Setup -> Build -> Develop -> Custom Settings
Custom Settings
Demo
Custom Settings
Demo
Custom Settings
Demo
Custom Settings
How do I use them?
 Apex

 List Custom Setting:

 Hierarchy:
 CustomSettingsName__c.getInstance(UserId 
ProfileId);
Summary
In this presentation we covered:

Custom Labels

Field Sets

Custom Settings
Roy Gilad
Israel DUG Leader,
@RoyGilad
Code is available for download at:
https://gist.github.com/RoyGilad
Presentation is available at:

http://www.slideshare.net/RoyGilad/salesforce-codingtechniques-that-keep-your-admins-happy-df13
Salesforce Coding techniques that keep your admins happy (DF13)

Mais conteúdo relacionado

Mais procurados

Visualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 PlatformVisualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 Platform
sg8002
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
EdwinOstos
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Fabio Franzini
 

Mais procurados (20)

Visualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 PlatformVisualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 Platform
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
 
Platform cache
Platform cachePlatform cache
Platform cache
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
 
Intro to Apex Programmers
Intro to Apex ProgrammersIntro to Apex Programmers
Intro to Apex Programmers
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Brudnick Net Ppt Portfolio
Brudnick Net Ppt PortfolioBrudnick Net Ppt Portfolio
Brudnick Net Ppt Portfolio
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per office
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
Oracle Forms to APEX conversion tool
Oracle Forms to APEX conversion toolOracle Forms to APEX conversion tool
Oracle Forms to APEX conversion tool
 
ASP.NET 4.0 Roadmap
ASP.NET 4.0 RoadmapASP.NET 4.0 Roadmap
ASP.NET 4.0 Roadmap
 
Salesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchSalesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 March
 
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developersChris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
 
Coding the Salesforce User Interface with Visualforce Pages
Coding the Salesforce User Interface with Visualforce PagesCoding the Salesforce User Interface with Visualforce Pages
Coding the Salesforce User Interface with Visualforce Pages
 
How to tdd your mvp
How to tdd your mvpHow to tdd your mvp
How to tdd your mvp
 
Oracle apex training | Oracle Application Application Express Training | Ora...
Oracle apex training | Oracle Application Application Express Training |  Ora...Oracle apex training | Oracle Application Application Express Training |  Ora...
Oracle apex training | Oracle Application Application Express Training | Ora...
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 

Destaque

How to scale and deploy NodeJS app
How to scale and deploy NodeJS appHow to scale and deploy NodeJS app
How to scale and deploy NodeJS app
Yacobus Reinhart
 

Destaque (20)

Apex collection patterns
Apex collection patternsApex collection patterns
Apex collection patterns
 
Apex Design Patterns
Apex Design PatternsApex Design Patterns
Apex Design Patterns
 
Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best Practices
 
Batch Apex in Salesforce
Batch Apex in SalesforceBatch Apex in Salesforce
Batch Apex in Salesforce
 
Salesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategySalesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer Strategy
 
Salesforce Performance hacks - Client Side
Salesforce Performance hacks - Client SideSalesforce Performance hacks - Client Side
Salesforce Performance hacks - Client Side
 
Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance Framework
 
Dependency Injection with Apex
Dependency Injection with ApexDependency Injection with Apex
Dependency Injection with Apex
 
Development lifecycle guide (part 1)
Development lifecycle guide (part 1)Development lifecycle guide (part 1)
Development lifecycle guide (part 1)
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
How to scale and deploy NodeJS app
How to scale and deploy NodeJS appHow to scale and deploy NodeJS app
How to scale and deploy NodeJS app
 
Governor limits
Governor limitsGovernor limits
Governor limits
 
From Sandbox To Production: An Introduction to Salesforce Release Management
From Sandbox To Production: An Introduction to Salesforce Release ManagementFrom Sandbox To Production: An Introduction to Salesforce Release Management
From Sandbox To Production: An Introduction to Salesforce Release Management
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3
 
Advanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous ProcessesAdvanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous Processes
 
Salesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for DeploymentSalesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for Deployment
 
Secure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISecure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part I
 
The Ideal Salesforce Development Lifecycle
The Ideal Salesforce Development LifecycleThe Ideal Salesforce Development Lifecycle
The Ideal Salesforce Development Lifecycle
 
Salesforce Data Structures
Salesforce Data StructuresSalesforce Data Structures
Salesforce Data Structures
 
Salesforce.com process map (from lead to opportunity)
Salesforce.com process map (from lead to opportunity)Salesforce.com process map (from lead to opportunity)
Salesforce.com process map (from lead to opportunity)
 

Semelhante a Salesforce Coding techniques that keep your admins happy (DF13)

Semelhante a Salesforce Coding techniques that keep your admins happy (DF13) (20)

Dev day paris020415
Dev day paris020415Dev day paris020415
Dev day paris020415
 
Ponakaladinne reddy
Ponakaladinne reddyPonakaladinne reddy
Ponakaladinne reddy
 
uppada_kishore_resume (1)
uppada_kishore_resume (1)uppada_kishore_resume (1)
uppada_kishore_resume (1)
 
Salesforce for marketing
Salesforce for marketingSalesforce for marketing
Salesforce for marketing
 
Srinivasaragavan Jayakumar
Srinivasaragavan JayakumarSrinivasaragavan Jayakumar
Srinivasaragavan Jayakumar
 
Salesforce Development Training In Noida Delhi NCR
Salesforce Development Training In Noida Delhi NCRSalesforce Development Training In Noida Delhi NCR
Salesforce Development Training In Noida Delhi NCR
 
Enhance model driven embedded canvas app here is all that you need to know!
Enhance model driven embedded canvas app  here is all that you need to know!Enhance model driven embedded canvas app  here is all that you need to know!
Enhance model driven embedded canvas app here is all that you need to know!
 
Salesforce Presentation
Salesforce PresentationSalesforce Presentation
Salesforce Presentation
 
Enhance model driven embedded canvas app here is all that you need to know!
Enhance model driven embedded canvas app  here is all that you need to know!Enhance model driven embedded canvas app  here is all that you need to know!
Enhance model driven embedded canvas app here is all that you need to know!
 
downloadfile
downloadfiledownloadfile
downloadfile
 
Venkatesh SFDC Resume
Venkatesh SFDC ResumeVenkatesh SFDC Resume
Venkatesh SFDC Resume
 
Top10 Salesforce.com Admin Tools
Top10 Salesforce.com Admin ToolsTop10 Salesforce.com Admin Tools
Top10 Salesforce.com Admin Tools
 
Dreamforce 19 Global Gatherings Sevilla Salesforce Developer Group
Dreamforce 19 Global Gatherings Sevilla Salesforce Developer GroupDreamforce 19 Global Gatherings Sevilla Salesforce Developer Group
Dreamforce 19 Global Gatherings Sevilla Salesforce Developer Group
 
Enter the World of PowerApps - Canvas vs. Model-Driven Apps
Enter the World of PowerApps - Canvas vs. Model-Driven AppsEnter the World of PowerApps - Canvas vs. Model-Driven Apps
Enter the World of PowerApps - Canvas vs. Model-Driven Apps
 
Resume
ResumeResume
Resume
 
Salesforce.com Overview
Salesforce.com   OverviewSalesforce.com   Overview
Salesforce.com Overview
 
Salesforce.com overview (1)
Salesforce.com   overview (1)Salesforce.com   overview (1)
Salesforce.com overview (1)
 
Write once, ship multiple times
Write once, ship multiple timesWrite once, ship multiple times
Write once, ship multiple times
 
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces ApplicationsCastle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
 
Salesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroSalesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer Intro
 

Mais de Roy Gilad

Mais de Roy Gilad (20)

How to Use Salesforce Platform Events to Help With Salesforce Limits
How to Use Salesforce Platform Events to Help With Salesforce LimitsHow to Use Salesforce Platform Events to Help With Salesforce Limits
How to Use Salesforce Platform Events to Help With Salesforce Limits
 
Dreamforce 2019: Do More Within Salesforce Governor Limits using Platform Events
Dreamforce 2019: Do More Within Salesforce Governor Limits using Platform EventsDreamforce 2019: Do More Within Salesforce Governor Limits using Platform Events
Dreamforce 2019: Do More Within Salesforce Governor Limits using Platform Events
 
Salesforce Order of Execution Chart
Salesforce Order of Execution ChartSalesforce Order of Execution Chart
Salesforce Order of Execution Chart
 
Sales cloud: The Sales-Operations & Salesforce Admin relationship
Sales cloud: The Sales-Operations & Salesforce Admin relationshipSales cloud: The Sales-Operations & Salesforce Admin relationship
Sales cloud: The Sales-Operations & Salesforce Admin relationship
 
Salesforce Summer 19 Release Overview
Salesforce Summer 19 Release OverviewSalesforce Summer 19 Release Overview
Salesforce Summer 19 Release Overview
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
 
Salesforce Spring19 Release Overview Deck
Salesforce Spring19 Release Overview DeckSalesforce Spring19 Release Overview Deck
Salesforce Spring19 Release Overview Deck
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
 
Einstein, not Frankenstein - Understanding Salesforce Artificial Intelligence
Einstein, not Frankenstein  - Understanding Salesforce Artificial IntelligenceEinstein, not Frankenstein  - Understanding Salesforce Artificial Intelligence
Einstein, not Frankenstein - Understanding Salesforce Artificial Intelligence
 
Salesforfce Summer '17 release overview deck
Salesforfce Summer '17 release overview deckSalesforfce Summer '17 release overview deck
Salesforfce Summer '17 release overview deck
 
Salesforce Lightning component framework from 0 to app
Salesforce Lightning component framework from 0 to appSalesforce Lightning component framework from 0 to app
Salesforce Lightning component framework from 0 to app
 
Salesforce Spring 17 Release Overview
Salesforce Spring 17 Release OverviewSalesforce Spring 17 Release Overview
Salesforce Spring 17 Release Overview
 
Salesforce Winter 17 Release Overview
Salesforce Winter 17 Release OverviewSalesforce Winter 17 Release Overview
Salesforce Winter 17 Release Overview
 
Salesforce Market Overview - Internal WalkMe's
Salesforce Market Overview - Internal WalkMe'sSalesforce Market Overview - Internal WalkMe's
Salesforce Market Overview - Internal WalkMe's
 
Salesforce Spring '16 Release Overview
Salesforce Spring '16 Release OverviewSalesforce Spring '16 Release Overview
Salesforce Spring '16 Release Overview
 
Salesforce Winter 16 Release Overview
Salesforce Winter 16 Release OverviewSalesforce Winter 16 Release Overview
Salesforce Winter 16 Release Overview
 
Salesforce Winter 16: Highlights!
Salesforce Winter 16: Highlights!Salesforce Winter 16: Highlights!
Salesforce Winter 16: Highlights!
 
Salesforce Trailhead - what is it?
Salesforce Trailhead  - what is it?Salesforce Trailhead  - what is it?
Salesforce Trailhead - what is it?
 
WalkMe: The Salesforce Success Story
WalkMe: The Salesforce Success StoryWalkMe: The Salesforce Success Story
WalkMe: The Salesforce Success Story
 
Salesforce: Spring Cleaning!
Salesforce: Spring Cleaning!Salesforce: Spring Cleaning!
Salesforce: Spring Cleaning!
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Salesforce Coding techniques that keep your admins happy (DF13)

  • 1. Coding techniques that keep your admins happy Writing configurable code in Salesforce Roy Gilad, Israel Salesforce DUG, Leader Conduit Mobile, CRM Solutions Manager @RoyGilad
  • 2. Roy Gilad Israel Salesforce DUG Leader CRM Solution Manager, Conduit Mobile @RoyGilad
  • 3. All about Conduit Mobile Award-winning, DIY app-creation platform, providing publishers with a one-stop shop for engaging users on the go and growing their business on mobile  One-click creation of custom-branded mobile apps and sites  Over 160,000 apps created; more than 1,000 new apps each day  Specialized features for different business verticals: small businesses, restaurants, events, education, and more  End-to-end solution: app creation, submission to app marketplaces, promotional tools, content management, and advanced analytics
  • 4. Coding techniques that keep your admins happy What is this session about?
  • 5. DRY principle Don’t Repeat Yourself: “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”
  • 6. Coding techniques that keep your admins happy In this presentation we will cover: Custom Labels Field Sets Custom Settings
  • 8. Custom Labels What is it?  Custom labels are custom text values that can be accessed from anywhere:  Apex classes  Visualforce pages  Formulas  Validation rules
  • 9. Custom Labels Why should we use it?  Text to be maintained by a system administrators.  DRY: Reuse and consistency throughout the organization.  Code readability.  Multi-lingual support.
  • 10. Custom Labels Where can we find them?  Setup-> Build -> Create -> Custom Labels
  • 12. Custom Labels Where should we use it?  Text in pages  Error messages in triggers  When you have multi-lingual org – A MUST!  Place-holder for repeated string in your code.
  • 13. Custom Labels How to use them?  Apex:  System.Label.Label_name  Visualforce:  {!$Label. Label_name}  Formula and validations:  $Label. Label_name
  • 15. Field Sets What is it?  Set of fields in an object that can be used dynamically in Apex and in Visualforce pages.  Field sets are a powerful tool when you have a number of fields used in the same operation, or in the same context.
  • 16. Field Sets Why should we use it?  Pages and integrations can be controlled by a system administrators.  DRY: Reuse and consistency throughout the organization.  Code readability.
  • 17. Field Sets Where can we find them?  Can be defined for any object: • In standard objects it can be found under the object name: • In custom objects it can be found as a related list in the object:
  • 19. Field Sets Where should we use them?  Visualforce pages and controllers.  Fields that are sometimes presented and updated together.
  • 20. Field Sets How to use them?  Visualforce pages: • {!$ObjectType.Account.FieldSets.FieldSetName}  Apex: • SObjectType.Account.FieldSets. FieldSetName.getFields()
  • 22. Custom Settings What is it?  Similar to custom objects.  Enable developers to create custom sets of data.  Enable to create and associate custom data for an organization, profile, or specific user.
  • 23. Custom Settings Why should we use it?  Access dictionary tables without querying.  Can provide Profile-specific and User-specific tables.
  • 24. Custom Settings Where can we find them?  Setup -> Build -> Develop -> Custom Settings
  • 28. Custom Settings How do I use them?  Apex  List Custom Setting:  Hierarchy:  CustomSettingsName__c.getInstance(UserId ProfileId);
  • 29. Summary In this presentation we covered: Custom Labels Field Sets Custom Settings
  • 30. Roy Gilad Israel DUG Leader, @RoyGilad
  • 31. Code is available for download at: https://gist.github.com/RoyGilad Presentation is available at: http://www.slideshare.net/RoyGilad/salesforce-codingtechniques-that-keep-your-admins-happy-df13