function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TheCustomCloudTheCustomCloud 

Why did they change custom settings?

Old code is now throwing me an error.

 

They seem to no longer support retrieving a value directly in a custom setting as seen below.  Anyone else had this problem after Saturday's release?

 

ex:

Id publicCalendarId = HardcodedIDs__c.getall().values().id__c;

spraetzspraetz

Hey Redfin, what exactly is the error?

 

I'll look into it.

spraetzspraetz

Also trying to understand exactly what you're doing in this case.

 

getAll() returns a map of Custom Settings Name to the actual Custom Setting record itself. 

 

Calling .values() on that map returns a list of the custom settings. 

 

You can't reference a custom field of a list like that.  You would need to specifcy which element of the list whose ID__c you want, correct?