Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user.

learn more… | top users | synonyms

1
vote
2answers
47 views

Unit Testing Callout with Custom Setting

It appears that my Dev org's custom settings are not available within the scope of a unit test so I've written code to insert the needed custom setting within the test. I have a callout method which ...
3
votes
2answers
30 views

Possible to use a “list” custom setting on a standard layout picklist field?

I've searched it and found a few things where people have put it as an idea to be voted for a few years ago, but I haven't seen any response from Salesforce on any I've seen, so what I want to know is ...
4
votes
1answer
76 views

Can you do a SOQL Query on a Hierarchical Custom Setting?

I have a Hierarchical Custom Setting that I need to SOQL use a SOQL query for using the current User's Profile. Currently I'm using the getInstance() method with the User Profile ID to get the custom ...
6
votes
2answers
43 views

App settings & static data

I need to store a few simple settings that describe the timing and behavior of an integration between Salesforce and a third party web app. In my former life, these things might have been stored in a ...
2
votes
2answers
36 views

How can I display assets as a tab page?

I want to be able to add Assets as a tab view however it is not available for this. I have that a third party app for activities can display an Activities tab. I would like to know how to do this for ...
2
votes
0answers
23 views

List custom setting works with getOrgDefaults() - should it?

I have checked the documentation, and getOrgDefaults() is only listed as a hierarchy custom setting method. ...
3
votes
2answers
55 views

How can I make a something like 'Custom Setting' point to an object

I'm finding myself use 'special objects' from time to time (e.g. an account to gather spam contacts), and I find myself wanting to refer to this object in apex code, JavaScript buttons etc. I'd rather ...
7
votes
1answer
53 views

Dynamic get doesn't work on Custom Settings?

One of the most basic and versatile sObject methods is get. For example: My_Object__c record = [SELECT Name FROM My_Object__c LIMIT 1]; system.assertNotEquals(null, record.get('Name')); However, ...
4
votes
1answer
36 views

How to store a private key in a protected custom setting for use in Crypto class?

The Salesforce crypto class documentation specifies that a private key should be stored as a protected custom setting. "A PKCS8 formatted private key in base64 decoded form is required. This private ...
2
votes
1answer
28 views

Retrieve custom setting value - apex

I created a custom setting with two fields Active__c and Age__c. In my apex code, I want to retrieve one record from this custom setting where Name='Days'. This will return only one record. Would I ...
1
vote
1answer
26 views

How to access a protected custom setting info in managed package

So, we uploaded the managed package and installed it in a new org (as the clients would) but when querying from an apex class the (protected) custom setting fields it throws an exception as if the ...
6
votes
1answer
54 views

How to set a custom setting value in a managed package securely?

My application uses an authorization key stored in a protected custom setting to authenticate users to connect to an external web service. Since you can't define a default value on package install for ...
1
vote
1answer
27 views

how to import data in custom settings from csv file

I have custom setting object and csv file to load data into the object. I tried Data Import wizard but custom setting object does not show up in the list of objects in wizard. Please guide me on this. ...
0
votes
0answers
35 views

Compile Error while intializing a List from Custom Setting

From Manual https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm Custom Setting Examples The following example uses a list custom setting called ...
3
votes
1answer
94 views

Custom Settings - SOQL Limit

I am new to custom settings. My assumption is Custom Settings are part of application cache as such querying against custom settings do not count against SOQL limit. This is my code snippet ...
2
votes
1answer
100 views

Custom Settings - Validation Rule

We have a custom setting (AllowableCombinations__c) that has the following fields Queue,Type,Name,Area It has 10 records containing the different allowable combinations of Queue/Type/Area and Sub ...
5
votes
1answer
43 views

How do I manage Protected Custom Settings in a BETA package?

As I understand there are two visibility modes for Custom Settings: Public settings, accessed via Setup > Custom Settings Protected settings, via Grant Login Access after installing a security ...
4
votes
2answers
112 views

Data Loader - Custom Settings Import

I am trying to import data into custom settings via data loader. I am getting an error during insert operation stating "Required fields are missing: [Name] " If it is a custom object I can set ...
1
vote
0answers
16 views

Is it possible to query Profiles in InstallHandler script of managed package?

Is it possible to query Profiles in InstallHandler script of managed package. I'd like to get target profile ids to create specific custom settings for them.
1
vote
1answer
68 views

Iterate over custom list setting and return all entries

If I have a custom list setting, 'Info_List__c' with 1 field, 'Info_Field__c'. What would a method look like that would iterate through the list and return all entries. And how would I call that ...
11
votes
1answer
124 views

custom setting getAll() versus SOQL

Does anyone have any background on which and when using the built in getAll() method for custom settings is better than just using traditional soql? I am aware that getAll retrieves from the cache ...
3
votes
1answer
22 views

Field Set for custom setting

Can we define a field set for a custom setting ? If yes, where do I do that ? If it's not possible, getting all the fields from custom setting will also do, which I can get using ...
3
votes
1answer
95 views

Custom Settings Limit: Cached data limit

Perhaps a silly question? In the Limits reference regarding custom settings we see "Custom Settings: Cached Data Limit" Where the limit is described as: The total amount of cached data allowed ...
0
votes
1answer
30 views

What's the order of the records after calling getall() method on a custom setting?

I've got a getall().values() on a custom setting, but the values retrieved doesn't seem to be ordered by the record's name. Why? Do I have to use only the getall() and then run a loop and order it?
4
votes
1answer
82 views

Is that possible to change the custom setting “visibility” from protected to public once after it is created?

i have created a custom setting with visibility as protected. And now i want it to make the visibility to public. But when i edit the custom setting the visibility option is greyed out. How could i ...
1
vote
1answer
37 views

Custom Settings creation through Apex without SetupOwnerId property

Is it important to specify SetupOwnerId in order to insert only defaults in managed package settings.SetupOwnerId = UserInfo.GetOrganizationId(); Is the custom settings created for current user or ...
2
votes
2answers
68 views

Validation rule for the data entered in custom settings is available?

Currently i am creating custom settings to store some configuration values. But, i wrongly entered some data in that and the data is invalid. Is there any mechanism like validation rule kind of thing ...
0
votes
2answers
28 views

Custom Settings data is not added to package. Any thoughts?

i have created few custom settings and loaded them with data and i added the custom setting to an unmanagaed package. While deploying the package in another org i saw the custom settings did not have ...
2
votes
1answer
57 views

Pop up message from custom setting

I have created a custom object and on the object i have created a custom button. when click on the button it send an email. And a pop up comes with a message "you have send an email". Now i have ...
1
vote
1answer
100 views

Using custom setting variable directly in a SOQL statement (System.QueryException: No such column xx entity)

I want to use custom setting in direct soql statement, but it turns out not working. Because of the requirement, I can't add another field in that object. The only thing I can do is to use Custom ...
4
votes
1answer
103 views

Custom Settings GetOrgDefaults with Professional Edition

So I have code along the lines of the following inside a managed package, and in one client org it's causing a null dereference exception. double d = 100; d *= ...
0
votes
0answers
193 views

Custom Settings into an Existing Multi Select Picklist in Visualforce

How to add list custom settings into an existing multi select picklist in visualforce? VF Page <apex:selectList value="{!selectedValue}" size="1" multiselect="false"> ...
1
vote
2answers
250 views

Outbound Message Endpoint URL Issue

I have a production salesforce instance sending outbound message to production Endpoint URL. However, upon sandbox refresh, the outbound message will be copied to sandbox, which results in outbound ...
5
votes
1answer
102 views

Custom Settings are NO SObjects - How to use them polymorphic?

My app uses different types of custom settings. Let's call them SettingA__c and SettingC_c. I want a method that handles both types of settings polymorphically. private void handle(SObject setting) ...
0
votes
1answer
274 views

Regarding VF page to custom settings

Req: I have a command button on VF page. When i click on it then a popup window needs to open (That can be achievable). When we add to some values those need to get saved into custom settings and ...
6
votes
2answers
104 views

Generic SObject Getters Return Null for Boolean fields?

Question Am I taking crazy pills are is it unexpected behavior for the generic sObject getters to return null for boolean fields? Background Was troubleshooting a null pointer error and noticed ...
2
votes
1answer
163 views

Workaround on 5000 character limit on formula field without writing a trigger

Does anyone know a workaround of the 5000 character limit on a formula field without having to create a trigger? I am trying to get the country ISO codes using a case statement but I'm hitting the ...
3
votes
1answer
32 views

Using Custom Setting to create navbar, how do I sort correctly?

I have created a custom setting, navbar, which has 1 custom field, URL (data type URL). In this field I have 5 elements that link to apex pages (Home, chatter, cases, etc) but it could go down to 3 or ...
7
votes
2answers
126 views

Giving users access to a specific custom setting without granting them Customize Application access

I'm working on a VF page to give some users access to certain custom settings without given them the entire Customize Application access. Is there anyway to edit and commit data into the system as an ...
6
votes
1answer
155 views

Does custom setting count against the total number of custom objects available for your organization?

The Salesforce documentationhas below line Custom settings are a type of custom object. Each custom setting counts against the total number of custom objects available for your organization. ...
8
votes
2answers
143 views

Are Custom Settings included in a Database.rollback()?

Apex has a Transaction Control system for rolling back changes to SObjects. Are Custom Settings included in a rollback? (To be more clear, are Custom Settings reverted to the state that they were in ...
6
votes
2answers
576 views

Visualforce: Displaying more than 20 records from a Custom Setting

I'm having issues with displaying more than 20 records from a Custom Setting on my visualforce page. I've tried using apex:repeat, apex:pageblocktable, apex:datatable with no luck. Best, Eric ...
2
votes
1answer
48 views

Triggers on CustomSettings/RecordTypes

Is it possible to create a work flow or trigger on changes in a custom setting or a record type? The problem I'd like to address is that I have a custom setting that maps some Account record types to ...
1
vote
1answer
85 views

Can Protected Custom Settings be CRUD'ed via the REST API? (Created, Read, Updated, and Deleted)

Can a protected custom setting be created, read, updated, and deleted from the REST API? Is it the same REST API that is used for SObjects?
4
votes
1answer
229 views

Can a trigger be attached to a Custom Setting?

I know triggers can be added to SObjects. Can the be added to Custom Settings as well? If so, then what would the apex look like?
2
votes
2answers
99 views

I want to assign my custom setting to my custom profile users?

I have my custom setting object Setting type Hierarchy and visibility Public. with 1 text type field and I want to give access to my custom profiles users. U have assigned the permission to my ...
4
votes
2answers
295 views

How to store a treeview in Visualforce to Database?

I have created a treeview in Visualforce Page. User can reorder the tree structure. Order of any level can be changed or the level itself can be changed using javascript. Now I need to have this ...
1
vote
2answers
399 views

Can we control the VisualForce Tab Visibility using custom settings

Can we control the VisualForce Tab Visibility using custom settings? Actually my use case is like, i have to create a VisualForce tab and need to control its visibility using custom setting so that i ...
8
votes
1answer
2k views

Populating Custom Settings field using Apex

I'm trying to populate/set/put/initialize a custom setting's field with a calculated value within my apex code. The field type is number. Is there a way to do this?
2
votes
1answer
98 views

Dynamic invocation (or emulation) of the hierarchy custom setting getInstance() method

I have a requirement to avoid any compile-time dependency on a managed package. Dynamic SOQL, SObjectType and SObject allow me to do this cleanly for normal objects. But now I need to access a public ...