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
23 views

Lead conversion unit tests throw errors for validation rules that use custom settings

I'm running into an odd issue with some of my unit tests & can't seem to find out what exactly is causing it the problem. Several of my unit tests revolve around converting a lead to an account ...
0
votes
2answers
48 views

Custom Settings values not being queried

I have a custom settings which has the following columns: Department || Sub Department || Employee || Serial Number My code is : for(CustomSettings__c cst: CustomSettings__c.getAll().values()) { ...
1
vote
0answers
19 views

Custom settings in subscriber's org not accessible by managed code

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script. However, I'm ...
1
vote
2answers
98 views

Null reference object trying to access custom setting in sandbox using APEX

I have created a Protected/List custom setting object in my org (not a managed package) It's Custom fields are: I created a dataset named: test with relevant values (I had another dataset with a ...
0
votes
2answers
25 views

Display Custom Setting from iterated value in Visualforce

I have a VF page & controller that is querying accounts and putting them into a list, and them displaying the fields Account Name, State,and Last Activity. I have a custom setting that is a list ...
1
vote
1answer
41 views

Record Type Id not being recognized when checked against value in List Custom Setting

I'm trying to check a custom setting, containing a list of Record Type Ids against the record type id of new opportunities that are being created. I only want the trigger to complete it's calculation, ...
4
votes
2answers
128 views

How do I access Custom Settings in Apex?

If I have a hierarchical custom setting: Custom_Page__c With one field: Url__c Using apex, how can I surface this field in a visualforce page? Can I just query it as if I was querying a custom ...
4
votes
1answer
123 views

Hitting governor limit while retrieving custom labels

In the current functionality, we retrieve custom labels from the source organization. The labels are retrieved from salesforce into another Salesforce organization. However, when retrieving the labels ...
0
votes
1answer
8 views

Translate Spanish characters to english [duplicate]

I have a custom object Address. Here in Line 1 (text) there Spanish characters are enterred. How to achieve a translator by a custom setting or any other way for data in salesforce? Can someone please ...
0
votes
1answer
36 views

Deploying the custom settings and accessing classes to Prod

I have a custom setting(list) with a custom field, which is accessed in the apex class in the sandbox. When I deploy the custom setting, custom field, apex class and test class to the Production, the ...
3
votes
1answer
86 views

Custom Setting issue in Test Class

I have written a pretty simple VF page that allows support users to add Case Assists (custom object related to Case) to their case. Pretty simple VF page, when opened, it creates a list of a wrapper ...
0
votes
1answer
23 views

Custom settings in one of the triggers

Currently we have a trigger on Account object which updates one field based on certain conditions and if that field value matches with another object where all the values are mentioned. One of the ...
1
vote
1answer
47 views

How do I dynamically reference a Record Type ID in a Custom Setting?

I am building an application that I hope to sell on the AppExchange. On that application, I am building three custom "new record" buttons on a related list (parent and child objects are both custom ...
0
votes
1answer
24 views

Accessing custom settings from a managed package using the Salesforce Platform license

Can we access (read, create, update and delete) custom settings from a managed package via Apex code? The person manipulating custom settings will be using Salesforce Platform license, not Salesforce ...
0
votes
0answers
18 views

SOQL vs getall() method [duplicate]

what is similar to SOQL query [SELECT name, customField__c FROM CustomSettings__c WHERE name = :account.name] for CustomSettings__c.getall().values(); method?
0
votes
1answer
143 views

How to automatically select a new record's picklist values based on the autocompletev2's form selecting a custom setting record?

I am using the autocompletev2 search box from blogforce9 to allow users to type a request and have the autocomplete show the closest options. Because autocompletev2 doesn't work with picklists, I had ...
0
votes
0answers
39 views

Urgent Issue on Custom Settings

I've a Custom Settings with Hierarchy, on that two fields Read__c, Unread__c. integer i=10; integer j=5; query1='select id,name,is_read__c, (select id from Attachments where createddate ...
0
votes
1answer
41 views

Access Custom Setting field value

I have a custom setting titled 'Authentication' and a field named 'token'. I need to access the value stored in 'token' in Apex, but I'm not sure how to do so. I'm aware of the get Instance() method, ...
0
votes
1answer
29 views

Approval Matrix using custom settings and its method

Could you help me with my method for my approval flow? I created a custom settings named Approver_Matrix . Here is a sample: Note: Private Account and Public Account fields were checkbox. For my ...
1
vote
2answers
64 views

How do you call a custom setting to open in a new window?

I have a visualforce page with custom buttons. Twas asked to add to the Custom Setting a field called ATLAS_ENDPOINT. I need to use this value to popup a new window with the link inside. VISUALFORCE ...
6
votes
2answers
261 views

Is encrypting passwords in protected custom settings a security requirement?

Regarding the Salesforce security review process, can anyone confirm (or deny) that storing a connection URL, username and password for a webservice utilized by an appexchange app can be done in plain ...
0
votes
1answer
109 views

Is there a way to initialize a custom setting in a test class?

My test class inserts test quote line items which sets off a trigger, that calls a Util class to pull a query of qli fields, 5 of which have their names stored in custom settings (I'm not 100% why ...
1
vote
1answer
35 views

Issue with decryption using the key in a protected custom setting

I'm working on an app with a base managed package and two extension packages. I need to encrypt a user-entered password as a part of post-installation setup (done right after the base package is ...
0
votes
2answers
46 views

Can I check for a Custom Setting in an Angular ng-show directive?

I'm working on an Angular project within Salesforce, I have a custom setting which determines whether or not certain elements on my page display or not, <apex:outputLink ...
2
votes
0answers
134 views

How to lock the Attach button on custom object record Notes & Attachments related list once the record get closed (Approved/Rejected)?

Now my business users can delete and attach another file even after the custom object record got approved/rejected. So they were asking for a way to lock the "Attach" button which is listed under ...
4
votes
3answers
126 views

Odd behavior with Custom Setting getInstance() Method

In an Org I'm working with we have a Custom Setting that holds a number of Zip Codes. The zip codes are populated in the Name field of the Custom Setting, with no other fields. We use the Lead ...
2
votes
1answer
42 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
54 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
145 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
4
votes
3answers
119 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
62 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 ...
12
votes
1answer
115 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
71 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
378 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
118 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
171 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
149 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
153 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
678 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
80 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
369 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
158 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
69 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 ...
10
votes
1answer
180 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
86 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 ...
3
votes
1answer
895 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 ...
2
votes
1answer
245 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
224 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
176 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
44 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 ...