• Jessica Meyer 1
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
It was my understanding after reading a few different posts and articles like this one that custom metadata types could have unlimited SOQL queries in a single Apex transaction. To give you an idea of the code that I'm using, it's designed to find a set of values (stored in custom metadata) to apply to an opportunity based off of some criteria pulled from the opp. When I tried to run this to update opps in bulk, it failed on the SOQL query error. My query:
List<Channel_Discount__mdt> chanSetting = [SELECT Direct__c,Fulfillment__c,Authorized__c,Certified__c,Regions__c,Excluded_Countries__c FROM Channel_Discount__mdt WHERE Discount__c = :w AND Distributor_Type__c = :distType AND Business_Type__c = :bisType];

Am I misunderstanding what is meant by "unlimited" queries?
It was my understanding after reading a few different posts and articles like this one that custom metadata types could have unlimited SOQL queries in a single Apex transaction. To give you an idea of the code that I'm using, it's designed to find a set of values (stored in custom metadata) to apply to an opportunity based off of some criteria pulled from the opp. When I tried to run this to update opps in bulk, it failed on the SOQL query error. My query:
List<Channel_Discount__mdt> chanSetting = [SELECT Direct__c,Fulfillment__c,Authorized__c,Certified__c,Regions__c,Excluded_Countries__c FROM Channel_Discount__mdt WHERE Discount__c = :w AND Distributor_Type__c = :distType AND Business_Type__c = :bisType];

Am I misunderstanding what is meant by "unlimited" queries?