Questions tagged [customsetting]

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.

Filter by
Sorted by
Tagged with
1
vote
1answer
569 views

Test Method throwing null pointer exception on custom setting

I am trying to write a test class. My Apex class has the following constructor: public NController(ApexPages.StandardController controller) { cas = (Case) controller.getRecord(); csId = ...
14
votes
1answer
223 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 ...
23
votes
2answers
4k views

Generating a guaranteed contiguous series of numbers

I am looking at a solution to providing a guaranteed contiguous sequence of numbers. This cannot be achieved via autonumber fields as numbers in the series are consumed by failed validations etc. - ...
3
votes
1answer
1k 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 ...
-1
votes
2answers
560 views

Fetch all custom settings

I have 10 custom settings in my org . I need to fetch all and need to use in apex class
6
votes
3answers
5k views

Combine Custom settings with Custom Labels

Is there a way to combine custom settings with custom labels ? So that the output from a setting value would be a custom label ? To explain: In example, we have an international organisation, and ...
6
votes
2answers
7k views

Custom setting Setting type not visible

I am trying to create a new custom setting in salesforce but the Setting Type field is greyed out and fixed to Hierarchy. What could be the possible problem?
5
votes
2answers
7k views

How to Access a Hierarchy Custom Setting from Lightning Component

In Apex we can do Hiearchy_Custom_Setting__c.getInstance().Field__c In Visualforce we can do $Setup.Hiearchy_Custom_Setting__c.Field__c Is there any equivalent way to access easily from a ...
0
votes
2answers
74 views

custom setting not displying correct picklist values based on the condtion

i have a custom setting called product and under that i created two fields called and other is string field BD__c. i want to display picklist value based on string matching record. my custom setting ...
0
votes
2answers
193 views

Custom Settings and fields

I have created the custom setting with the hierarchy type I have added some fields to the custom settings phone field is added to the custom settings custom setting Name:Order_Configuration__c ...
65
votes
3answers
16k 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 ...
15
votes
4answers
7k 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 ...
29
votes
1answer
20k 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?
9
votes
2answers
1k 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 ...
7
votes
1answer
3k 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 ...
18
votes
1answer
15k views

Custom setting List vs Hierarchy

What is the difference between Custom Setting Type "List" and "Hierachy"?
13
votes
3answers
3k views

Unable to insert new records into “hierarchy” type Custom Setting

**Update Oct 23 2013: The fix to Known Issue W-1890544 is now being rolled out to sandboxes. I just verified by creating a brand new sandbox and I'm now able to insert new records into "Hierarchy" ...
13
votes
2answers
843 views

Internal Server Error Accessing Org-Default Custom Setting In Test Method - Problem With Currency Values

This is driving me slightly crazy. I have a hierarchy type custom setting which has a currency field. Inside a trigger I do the following: Global_Settings__c gs = Global_Settings__c.getOrgDefaults();...
4
votes
2answers
2k views

Activate and Deactivate trigger using Custom Setting

I have an Apex class called ShippingAddressTriggerHandler and Trigger called ShippingAddress on object Shipping. I want to create a custom setting called SwitchTrigger with checkbox Activate. ...
2
votes
1answer
171 views

What is a protected custom setting record?

If I look at this post: What is the correct, secure way to store API passwords for a managed package that will be an app? it leads me to here: Is encrypting passwords in protected custom settings a ...
0
votes
2answers
370 views

use custom settings for setting Status field of different Case Record Type

I am basically fishing for ideas here. I am a beginner, so i have a crude way of accomplishing task, but i would appreciate if someone experienced can provide some better ides. Task - I have a custom ...
13
votes
3answers
27k views

Retrieving Values from Custom Settings

I have created a Custom Settings 'Tal_Source_Map__c' which has 4 fields. SF_Source_Type__c SF_Source_Sub_Type__c Tal_Source_Type__c Tal_Source_Type__c Combination of SF_Source_Type__c and ...
5
votes
1answer
746 views

What is API name of 'Location' field in hierarchy custom setting or how to get it in code?

I want to fetch type of hierarchy setting(profile OR User), compare it and do some logic. For that I am using setupOwner.Type in SOQL query as: SELECT SetupOwner.Name,SetupOwner.Type,SetupOwnerId, ...
3
votes
2answers
162 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 ...
3
votes
3answers
996 views

Calling .put on Map of Custom Settings cause 'Collection is read only' Apex error

I create a map of Custom Settings and then try to add a new one to it. But it throws the error AssignByLeadSource: execution of BeforeInsert caused by: System.FinalException: Collection is read-...
3
votes
1answer
3k views

How can I build a complex Visualforce Dynamic Binding dynamically?

How can I build a complex Visualforce Dynamic Binding dynamically? Yeah, I realize the question seems a bit redundant, but I couldn't think of a better way to describe what I'm trying to do. The short ...
2
votes
1answer
738 views

Edit Custom Metadata Records from a Managed Package

Custom metadata records seem to be great mechanism to store application configuration details, as unlike Custom objects or Custom settings, custom metadata records can be packaged with a managed ...
2
votes
1answer
2k 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 ...
2
votes
2answers
684 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 ...
2
votes
1answer
365 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
1answer
1k views

How to pass LIST custom setting list(array) from client side to server side controller in lightning?

I have created an array of list custom setting in JS controller of lightning component. When I call apex controller method and pass this array, inside controller its value comes as empty. However, ...
1
vote
2answers
700 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 ...
1
vote
1answer
2k views

how to retrieve fields of custom setting in apex controller?

hi guys i have added custom setting "Taxes" and in that i have 10 different fields as taxes names. now i have to list down that taxes names in select list in visual force page. so now how to retrieve ...
1
vote
1answer
279 views

Updating Custom Setting Using RemoteObject in Visualforce pages

I am trying to update the Custom Setting using remote Object in visualforce page, the scenario is when every time on load of the page I want to update the sessionId in custom setting, but using remote ...
0
votes
1answer
7k views

Test class with custom setting

I' have written a trigger on lead, very simple. I'am using the custom setting for the first tine to avoid hard coding or query to get ids. I haven't experience testing custom setting. I have a ...
0
votes
1answer
578 views

Custom Setting providing NULL value

I created a Custom Setting to store an Id so I do not have to hard-code it. The custom setting API name is SQUAD_GLOBAL_VALUE_SET_ID__c and is of type 'Hierarchy'. It has 1 field called Squad Picklist ...
0
votes
2answers
131 views

Can I delete Custom Settings in Managed package salesforce?

Is there a way to delete custom settings, We are changing the custom setting to a custom object with the same API name but it was not an issue in UAT and Development Org. But seems couldn't delete the ...
0
votes
1answer
355 views

NullPointerException when running unit test

I have a class that I have been running without any issues. I've created a test class to get a bit of code coverage for it and the test is failing when the constructor is called. Without going into ...
0
votes
2answers
53 views

Compiled Formula is too big : Also does not work under Workflow criteria

Formula to compute the value of Office__c is as follows. CASE( Account__r.Office__c , "Americas","Americas", "EMEA","EMEA", "China", "China", "Hongkong", "Hongkong", "Taiwan", "Taiwan", "Korea", "...