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

2
votes
1answer
18 views

Using existing Setup Objects in Test Class - Mixed DML Operation error

I'm writing a Test Class in order to test some code which automatically completes CaseMilestones when certain changes are made to a Case. My code checks that the Case which has been changed has a ...
2
votes
1answer
21 views

custom setting SOQL vs methods

i often come across scenarios where we have some custom setting with lots of fields created which has rows for multiple purposes. So for a specific scenario, it is often needed to filter all the rows ...
2
votes
2answers
13 views

How do Internal User manages Custom Setting data without 'Customize Application' Permission?

We have created Vf page to manage custom setting data , its working well for system admin but when we logged in as internal user it throws this error :system.security.NoAccessException: Create access ...
0
votes
0answers
27 views

Create Public custom settings via REST API

First, is it possible to create a custom object without using Metadata SOAP API ? As per my reading until now it is not possible. I know for a fact, one can create ApexTrigger using REST API. Since I ...
0
votes
1answer
11 views

Add shortcut to custom settings

Is there a way to create a shortcut or quick access button to custom settings in salesforce? I want sales team to easily add new values or remove existing without going into setup, but custom object ...
1
vote
2answers
21 views

Hierarchical custom setting

I would like to know about some real world examples of hierarchical custom setting.
18
votes
1answer
219 views

What is the difference between Custom Settings and Custom Metadata Types

Summer '15 is going to include the GA release of Custom Metadata Types. See Introducing custom metadata types: the app configuration engine for Force.com Are Custom Metadata Types intended as a ...
5
votes
2answers
45 views

Codes and Values

We have clients that use a lot of codes in their day to day activity. Eg: Take a look at the UK Government Common Basic Dataset: ...
1
vote
1answer
58 views

query sObject or Custom setting by multiple fields

i need to implement logic at couple of places which is like querying an sObject or a custom setting. There are input fields using which i need to create filter criteria to reach appropriate records in ...
0
votes
1answer
15 views

When inserting a record with name which is already existing in record of custom setting, It gives an error that name already exist?

I have custom setting with three records there is four fields name, price, sales, active. I want to insert a new record with same name but different others field values.I have a VF page there is a ...
1
vote
2answers
55 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
65 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()) { ...
2
votes
0answers
56 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
154 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
50 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
59 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
204 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
146 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
10 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
68 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
362 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
56 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
70 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
32 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
19 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
200 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
42 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
83 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
51 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
74 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
324 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
145 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
38 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
52 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
168 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
192 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
65 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
73 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
236 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
134 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
84 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
127 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
83 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
522 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
146 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
219 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
167 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
215 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
950 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
91 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 ...