SlideShare a Scribd company logo
Ghulam Mohayyudin(Group Leader)
Agenda
● What is Custom Settings
● What is Custom Metadata Types
● What is Custom Label
● Difference between Custom Settings and Custom Metadata Types
● Use Custom Settings and Custom Metadata Types in Code
● Demo
What Is Custom Setting?
● Custom settings are similar to custom objects in that they let you customize org data
● It has a suffix of “__C” like custom object
● Custom settings data is exposed in the application cache, which enables efficient access without the
cost of repeated queries to the database
● Custom settings can be associated with an organization, profile or a specific user.
● The visibility of the custom setting can be controlled by marking it as public or protected.
● Custom Settings data set can be used in Formula fields, Validation rules, flows, Apex and SOAP
API.
Types of Custom Setting
● List Custom Settings
○ Same Data for every user in the org
● Hierarchy Custom Settings
○ Data can be fetched based on profile and user
Custom Fields Supported in Custom Setting
What Is Custom Metadata Type?
● A custom metadata type is an object that is used to define the structure for application metadata.
● Custom Metadata type data is exposed in the application cache, which enables efficient access
without the cost of repeated queries to the database
● The fields of custom metadata types, and the values in the fields, consist only of metadata.
● Records of custom metadata types are deployable and with across the environment change sets or
packaged in managed packages.
● Custom metadata types set can be used in Formula fields, Validation rules, flows, Apex and SOAP
API.
Custom Fields Supported in Custom Metadata
Type
What Is Custom Label?
● Custom labels are custom text values.
● Custom labels can be accessed from Apex classes, Visualforce pages, Lightning pages, or
Lightning components.
● You can create up to 5,000 custom labels for your organization
● they can be up to 1,000 characters in length
● Custom labels from managed packages don’t count toward this limit.
● Custom labels can be used in Formula fields, Validation rules, flows, Apex and SOAP API.
How to access custom lebel
• In Apex use the System.Label.Label_name syntax.
• In Flow Builder, use the $Label global variable.
• In Visualforce, use the $Label global variable.
• In Aura components, use the $Label.c.labelName syntax for the default
namespace or $Label.namespace.labelName if your org has a namespace or
to access a label in a managed package.
• In Lightning web components, import the label using
the @salesforce/label/namespace.Label_name syntax.
• In Lightning App Builder component labels and attributes, use
the {!$Label.customLabelName} expression.
Custom Metadata Types VS Custom Settings
Custom Settings Custom Metadata Types
Type
Custom Settings are also similar to custom objects. You can
either create a List based or hierarchy based custom
setting.
Custom metadata does not support Hierarchy type of data
based on user profile or a specific user.
Deployment
Custom settings data cannot be deployed using packages
or Metadata API/Change Sets.
Custom metadata types data can be easily packaged and
deployed. Metadata types can also be deployed via Change
Sets/Metadata API.
Relationship Field Custom settings do not support relationship fields. You can create lookups between Custom Metadata objects.
Suffix It has a suffix of “__C” like custom object It has a suffix of “__mdt”
Test Class Custom setting data is not visible in test classes.
Custom metadata types are visible in test class without the
“SeeAllData” annotation.
DML in Apex
You can perform CUD (Create, Update, Delete) operation
on custom setting in apex.
You cannot perform CUD (Create, Update, Delete)
operation on custom metadata type in apex.
SOQL
You can access custom setting data using instance
methods and can avoid SOQL queries to database
With custom metadata types, you can issue unlimited
(SOQL) queries for each Apex transaction. But methods are
also available.
Custom Metadata Types VS Custom Settings
Access Custom Settings in Code
● Formula Fields (work for hierarchy custom settings; they can’t be used for list custom settings.)
{!$Setup.CustomSettingName__c.CustomFieldName__c}
● Hierarchy Custom Settings
getOrgDefaults method to return the data set values for the organization level:
CustomSettingName__c mc = CustomSettingName__c.getOrgDefaults();
getInstance method to return the data set values for the specified profile. The getInstance method can also be used with a user ID.
CustomSettingName__c mc = CustomSettingName__c.getInstance(Profile_ID);
● List Custom Settings
Map<String, CustomSettingName__c> mcs = CustomSettingName__c.getAll();
CustomSettingName__c mc = CustomSettingName__c.getValues(data_set_name);
Access Custom Metadata Type in Code
● List<Demo__mdt> demo = Demo__mdt.getAll().values();
● Map<String, Demo__mdt > mcs Demo__mdt.getAll();
● Demo__mdt mc = Demo__mdt.getInstance('m00000000000001');
● Demo__mdt[] testCustomMedataData = [SELECT MasterLabel, QualifiedApiName, Custom_Field__c
,Minimum_Support_Level__c FROM Demo__mdt];
Demo
Custom Metadata and Custom Settings and Custom Lebel in Salesforce.pptx

More Related Content

What's hot

Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRM
Kumari Warsha Goel
 
Microsoft 365 Compliance and Security Overview
Microsoft 365 Compliance and Security OverviewMicrosoft 365 Compliance and Security Overview
Microsoft 365 Compliance and Security Overview
David J Rosenthal
 
Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...
Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...
Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...
Richard Harbridge
 

What's hot (20)

Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRM
 
Oaf personalization examples
Oaf personalization examplesOaf personalization examples
Oaf personalization examples
 
Preparing, Piloting & Paths to Success with Microsoft Copilot
Preparing, Piloting & Paths to Success with Microsoft CopilotPreparing, Piloting & Paths to Success with Microsoft Copilot
Preparing, Piloting & Paths to Success with Microsoft Copilot
 
High Reliability DML and Concurrency Design Patterns for Apex
High Reliability DML and Concurrency Design Patterns for ApexHigh Reliability DML and Concurrency Design Patterns for Apex
High Reliability DML and Concurrency Design Patterns for Apex
 
Microsoft 365 Compliance and Security Overview
Microsoft 365 Compliance and Security OverviewMicrosoft 365 Compliance and Security Overview
Microsoft 365 Compliance and Security Overview
 
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
 
Best Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfBest Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdf
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
The Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphThe Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge Graph
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Sharing and setting in salesforce
Sharing and setting in salesforceSharing and setting in salesforce
Sharing and setting in salesforce
 
How to Create Oracle Fusion BI Publisher Report Using RTF Template
How to Create Oracle Fusion BI Publisher Report Using RTF TemplateHow to Create Oracle Fusion BI Publisher Report Using RTF Template
How to Create Oracle Fusion BI Publisher Report Using RTF Template
 
Microsoft Office 365 Advanced Threat Protection
Microsoft Office 365 Advanced Threat ProtectionMicrosoft Office 365 Advanced Threat Protection
Microsoft Office 365 Advanced Threat Protection
 
Oracle report from ppt
Oracle report from pptOracle report from ppt
Oracle report from ppt
 
Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...
 
Customizing Oracle EBS OA Framework
Customizing Oracle EBS OA FrameworkCustomizing Oracle EBS OA Framework
Customizing Oracle EBS OA Framework
 
Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...
Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...
Masterclass On Improving & Measuring Onboarding, Retention & Wellbeing With M...
 
Profiles and permission sets in salesforce
Profiles and permission sets in salesforceProfiles and permission sets in salesforce
Profiles and permission sets in salesforce
 
AD Manager Plus Help Document
AD Manager Plus Help DocumentAD Manager Plus Help Document
AD Manager Plus Help Document
 
Relationships in Salesforce
Relationships in SalesforceRelationships in Salesforce
Relationships in Salesforce
 

Similar to Custom Metadata and Custom Settings and Custom Lebel in Salesforce.pptx

Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
Ali Taki
 
Advanced Web Form Practices - Miguel A. Castro
Advanced Web Form Practices - Miguel A. CastroAdvanced Web Form Practices - Miguel A. Castro
Advanced Web Form Practices - Miguel A. Castro
Mohammad Tayseer
 
24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...
24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...
24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...
Hossam El-Faxe
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
brendonschwartz
 

Similar to Custom Metadata and Custom Settings and Custom Lebel in Salesforce.pptx (20)

walkmod - JUG talk
walkmod - JUG talkwalkmod - JUG talk
walkmod - JUG talk
 
Custom Metadata Records Deployment From Apex Code
Custom Metadata Records Deployment From Apex CodeCustom Metadata Records Deployment From Apex Code
Custom Metadata Records Deployment From Apex Code
 
Custom Metadata Types
Custom Metadata TypesCustom Metadata Types
Custom Metadata Types
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
 
Common Data Model - A Business Database!
Common Data Model - A Business Database!Common Data Model - A Business Database!
Common Data Model - A Business Database!
 
Java on Google App engine
Java on Google App engineJava on Google App engine
Java on Google App engine
 
Coding standards
Coding standards Coding standards
Coding standards
 
UNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningUNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data Mining
 
Salesforce integration questions
Salesforce integration questionsSalesforce integration questions
Salesforce integration questions
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 
Object Oriented Programming C#
Object Oriented Programming C#Object Oriented Programming C#
Object Oriented Programming C#
 
VB.net
VB.netVB.net
VB.net
 
NHSPUG June 2015 - Must Love Term Sets: The New and Improved Managed Metadat...
NHSPUG June 2015  - Must Love Term Sets: The New and Improved Managed Metadat...NHSPUG June 2015  - Must Love Term Sets: The New and Improved Managed Metadat...
NHSPUG June 2015 - Must Love Term Sets: The New and Improved Managed Metadat...
 
Common Data Service – A Business Database!
Common Data Service – A Business Database!Common Data Service – A Business Database!
Common Data Service – A Business Database!
 
Advanced Web Form Practices - Miguel A. Castro
Advanced Web Form Practices - Miguel A. CastroAdvanced Web Form Practices - Miguel A. Castro
Advanced Web Form Practices - Miguel A. Castro
 
Ooluk Data Dictionary Manager
Ooluk Data Dictionary ManagerOoluk Data Dictionary Manager
Ooluk Data Dictionary Manager
 
Structured SEO Data: An overview and how to for Drupal
Structured SEO Data:  An overview and how to for DrupalStructured SEO Data:  An overview and how to for Drupal
Structured SEO Data: An overview and how to for Drupal
 
24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...
24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...
24221030 Enhance Oracle Sshr With Advanced Personalizations And Oa Fwk Extens...
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
 

Recently uploaded

How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 

Recently uploaded (20)

GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 

Custom Metadata and Custom Settings and Custom Lebel in Salesforce.pptx

  • 1.
  • 3.
  • 4. Agenda ● What is Custom Settings ● What is Custom Metadata Types ● What is Custom Label ● Difference between Custom Settings and Custom Metadata Types ● Use Custom Settings and Custom Metadata Types in Code ● Demo
  • 5. What Is Custom Setting? ● Custom settings are similar to custom objects in that they let you customize org data ● It has a suffix of “__C” like custom object ● Custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database ● Custom settings can be associated with an organization, profile or a specific user. ● The visibility of the custom setting can be controlled by marking it as public or protected. ● Custom Settings data set can be used in Formula fields, Validation rules, flows, Apex and SOAP API.
  • 6. Types of Custom Setting ● List Custom Settings ○ Same Data for every user in the org ● Hierarchy Custom Settings ○ Data can be fetched based on profile and user
  • 7. Custom Fields Supported in Custom Setting
  • 8. What Is Custom Metadata Type? ● A custom metadata type is an object that is used to define the structure for application metadata. ● Custom Metadata type data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database ● The fields of custom metadata types, and the values in the fields, consist only of metadata. ● Records of custom metadata types are deployable and with across the environment change sets or packaged in managed packages. ● Custom metadata types set can be used in Formula fields, Validation rules, flows, Apex and SOAP API.
  • 9. Custom Fields Supported in Custom Metadata Type
  • 10. What Is Custom Label? ● Custom labels are custom text values. ● Custom labels can be accessed from Apex classes, Visualforce pages, Lightning pages, or Lightning components. ● You can create up to 5,000 custom labels for your organization ● they can be up to 1,000 characters in length ● Custom labels from managed packages don’t count toward this limit. ● Custom labels can be used in Formula fields, Validation rules, flows, Apex and SOAP API.
  • 11. How to access custom lebel • In Apex use the System.Label.Label_name syntax. • In Flow Builder, use the $Label global variable. • In Visualforce, use the $Label global variable. • In Aura components, use the $Label.c.labelName syntax for the default namespace or $Label.namespace.labelName if your org has a namespace or to access a label in a managed package. • In Lightning web components, import the label using the @salesforce/label/namespace.Label_name syntax. • In Lightning App Builder component labels and attributes, use the {!$Label.customLabelName} expression.
  • 12. Custom Metadata Types VS Custom Settings Custom Settings Custom Metadata Types Type Custom Settings are also similar to custom objects. You can either create a List based or hierarchy based custom setting. Custom metadata does not support Hierarchy type of data based on user profile or a specific user. Deployment Custom settings data cannot be deployed using packages or Metadata API/Change Sets. Custom metadata types data can be easily packaged and deployed. Metadata types can also be deployed via Change Sets/Metadata API. Relationship Field Custom settings do not support relationship fields. You can create lookups between Custom Metadata objects. Suffix It has a suffix of “__C” like custom object It has a suffix of “__mdt” Test Class Custom setting data is not visible in test classes. Custom metadata types are visible in test class without the “SeeAllData” annotation. DML in Apex You can perform CUD (Create, Update, Delete) operation on custom setting in apex. You cannot perform CUD (Create, Update, Delete) operation on custom metadata type in apex. SOQL You can access custom setting data using instance methods and can avoid SOQL queries to database With custom metadata types, you can issue unlimited (SOQL) queries for each Apex transaction. But methods are also available.
  • 13. Custom Metadata Types VS Custom Settings
  • 14. Access Custom Settings in Code ● Formula Fields (work for hierarchy custom settings; they can’t be used for list custom settings.) {!$Setup.CustomSettingName__c.CustomFieldName__c} ● Hierarchy Custom Settings getOrgDefaults method to return the data set values for the organization level: CustomSettingName__c mc = CustomSettingName__c.getOrgDefaults(); getInstance method to return the data set values for the specified profile. The getInstance method can also be used with a user ID. CustomSettingName__c mc = CustomSettingName__c.getInstance(Profile_ID); ● List Custom Settings Map<String, CustomSettingName__c> mcs = CustomSettingName__c.getAll(); CustomSettingName__c mc = CustomSettingName__c.getValues(data_set_name);
  • 15. Access Custom Metadata Type in Code ● List<Demo__mdt> demo = Demo__mdt.getAll().values(); ● Map<String, Demo__mdt > mcs Demo__mdt.getAll(); ● Demo__mdt mc = Demo__mdt.getInstance('m00000000000001'); ● Demo__mdt[] testCustomMedataData = [SELECT MasterLabel, QualifiedApiName, Custom_Field__c ,Minimum_Support_Level__c FROM Demo__mdt];
  • 16. Demo