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
votes
0answers
12 views

How to write apex tests for custom settings? [duplicate]

I want to write a test class for a trigger which contain a custom setting. trigger UpdateState on account (before insert,before update) { map<String, CityStateSettings__c> CityMap = ...
2
votes
1answer
22 views

Does Upsert work with Custom Settings?

I am trying to create and update records in Custom Settings object. I am able to use insert but did not find an option to upsert. Does upsert work with custom settings? Please suggest.
2
votes
1answer
27 views

How to Use Custom Setting to Avoid Insecure Credential Storage Vulnerability?

I got a comment from Salesforce team about an insecure credential storage vulnerability saying that we must avoid hardcoding sensitive information and should use the custom settings. My situation ...
0
votes
1answer
22 views

How to access Custom settings in javascript

I have custom setting of either Hierarchy or List type and i want to access it into javascript of non Vf page i.e. on HTML page in salesforce. How to implement this? any ideas
3
votes
2answers
49 views

How to construct mileage expense formula without hard coding the mileage rate into the expense field

I have created a "mileage expense" formula field which calculated the "miles" field by the mileage reimbursement rate - $.56 - hard coded into the formula. Mileage reimbursement rates change at least ...
0
votes
1answer
21 views

How to get Metadata info on a custom setting?

I have a custom setting that I created with some variable, one of which is a number field. In apex, I want to determine the number of digits that the field is allowed. I'm new to the world of custom ...
9
votes
0answers
72 views

API 31.0 breaking change in namespaced Visualforce $Setup global

Has anyone encountered this problem when evaluating $Setup global variable in Visualforce? If, in an organization with a namespace prefix, I have a hierarchy Custom Setting like the following, it ...
3
votes
0answers
32 views

Store Private/Public Key pair in a Custom Setting

I'm creating a digital signature for an integration and I've created a private/public key pair to sign the message. According to the Apex Crypto Class documentation, This private key should not ...
1
vote
1answer
53 views

How can I access List type custom setting object in button click javascript?

Here is the code.. if({!CONTAINS($Setup.CommercientSF3__CommercientURL__c.CommercientSF3__URL__c,',')}) { ...
3
votes
1answer
34 views

Can Hierarchical Custom Settings be used in Javascript Remoting calls?

Can we use JS Remoting to Fetch and update Hierarchical Custom Settings? Also, if yes, then can we make it work as well if Custom Setting object is in Protected Mode?
0
votes
1answer
47 views

How to access custom setting url field in apex?

How to access custom setting url field in apex.In my class i have a link in success message "Create Record". when user click the link it will diplay the site page.My problem is how to access the url ...
1
vote
2answers
76 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
39 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
114 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
46 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
59 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
46 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
59 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 ...
8
votes
1answer
85 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
47 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
42 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
66 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
88 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
51 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
40 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
177 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
213 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
48 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
185 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
21 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
109 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
177 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
23 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
169 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
36 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
150 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
41 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
72 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
30 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
69 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
129 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
138 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
251 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
368 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
119 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
386 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
147 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 ...
3
votes
1answer
258 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
36 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 ...
10
votes
3answers
232 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 ...