Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to get values stored in custom metadata type object in Salesforce Apex?

    Tagged: Apex Component, Custom Metadata Loader, Custom Metadata Type, Get Values in Salesforce, Salesforce Apex Class

    • Salesforce® Discussions

      How to get values stored in custom metadata type object in Salesforce Apex?

      Posted by kapil on March 19, 2018 at 10:05 AM

      how to get values stored in custom metadata type object in apex?

      Parul replied 7 years, 11 months ago 3 Members · 2 Replies
      • Apex Component
      • Custom Metadata Loader
      • Custom Metadata Type
      • Get Values in Salesforce
      • Salesforce Apex Class
    • 2 Replies
    • PRANAV

      Member
      March 19, 2018 at 10:55 AM

      Hi Kapil,

      The Custom Metadata Type has a suffix of __mdt instead of __c (for Custom objects/fields).

      Custom metadata type field names have a suffix of __c, like other custom fields.

      You can do query like this

      SELECT Entity_Relationship__c, Field_Relationship__c, Default__c FROM Source_Default_Value__mdt WHERE Entity_Relationship__c = 'Account'

      For more you can refer to the standard salesforce guide "Custom Metadata Types
      Implementation Guide" and practise this on Trailhead "Custom Metadata Types".

      Hope this helps you.

    • [adinserter block='9']
    • Parul

      Member
      September 18, 2018 at 8:03 PM

      Hi

      You can do query like this

      SELECT Entity_Relationship__c, Field_Relationship__c, Default__c FROM Source_Default_Value__mdt WHERE Entity_Relationship__c = ‘Account’.

       

      Thanks

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Salesforce Podcasts

    Top 10 Salesforce Podcasts You Must Follow in 2021

    Blog in Salesforce

    Whether you’re a novice Salesforce user or someone with years of experience using its CRM features, there’s always more that you can learn about it.…

    Business Development, Businesses, Coding and Development, Complex Sales Techniques, Consultants
    Linda Ferguson Apr 8, 2021
    5,242  Views
    Process Automation

    Salesforce Process Automation Best Practices

    Blog in Others, Salesforce, Salesforce Products

    Salesforce Process Builder was by far one of Salesforce Users' most helpful and popular features. Salesforce uses Process Builder to automate business operations. Relatively new…

    Apex Triggers, Approval Processes, Automated Conditions, Automated Email, Automation Activities
    Cymetrix Jun 24, 2021
    8,488  Views

    Benefits of Salesforce for FinTech: Boosting Efficiency and Scaling Growth

    Blog in Salesforce Implementation

    In recent years, the FinTech industry has boomed and transformed how people manage money, invest, and access financial products. However, with this growth, FinTech organizations…

    Automated Workflows, Benefits of Salesforce, Business Scalability, Cloud Based CRM, Collaboration Tools
    Bacancy Jun 10, 2024
    808  Views

    Popular Salesforce Videos

    Salesforce Trailblazer Answers Leaders on YouTube

    Salesforce Trailblazer Answers Leaders on YouTube

    Video in Trailhead

    At Salesforce we’re using the power of our Trailblazer Community with Slack Connect to scale self-help content creation. Watch this short video to learn how…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Jogender May 20, 2022
    4,651  Views
    Florida DataTribe EA Virtual Salesforce Saturdays

    Florida DataTribe EA Virtual Salesforce Saturdays

    Video in Salesforce Stories

    Learn to teach so you can learn by teaching. The how why and when of the Florida DataTribe and their Einstein Virtual Salesforce Saturdays. Enjoy…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Salesforce information
    Nauman Aug 17, 2020
    1,474  Views
    Salesforce Essentials

    Salesforce Essentials

    Video in Others

    Watch this video to learn what customer relationship management (CRM) is and how CRM helps companies better engage with prospects and customers, streamline communications, and…

    Rupal Kakkar Jan 23, 2020
    2,390  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.