Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

3
votes
0answers
24 views

DX Orgs and Custom Settings

I ran into an issue whereby I created a hierarchy custom setting in my DX scratch org but when I used the SDFX CLI to pull down the metadata it was ignored. I had used list custom settings before and ...
0
votes
0answers
14 views

Custom field to update Embeddable RingCentral for Salesforce Widget userPresence

We are making the switch to Salesforce (from GoldMine) and we are working to implement a system that will automatically route phone calls to the appropriate trip adviser based on their destination ...
0
votes
0answers
21 views

Field Service Lightning “Cannot Dispatch Next Service Error”

I've been implementing and developing Salesforce , Field Service Lightning in order to pursuit my workplace goals and mission. Currently the workforce is experiencing a short block that needs to be ...
1
vote
2answers
40 views

Any way to create a link to a custom setting's “manage” page?

In a custom (Visualforce) setup page, I would like to provide links that open the "Manage" view for some of our custom settings. Can URLFOR (or some other mechanism) provide such a URL? This also ...
2
votes
0answers
16 views

Should I use List custom settings in my managed package app?

BACKGROUND I am working on a managed package application and I need to store some configuration data. This data is supposed to be edited by admins in the subscriber org. The setting simply stores ...
0
votes
0answers
27 views

Test Class Error - REQUIRED_FIELD_MISSING,,Specify a value for the Duplicate Rule ID field

I have created custom setting to store the ID's of all my active Duplicate Rules. In a test class when I try to assign the custom setting field value I get an error as follows System.DmlException:...
1
vote
0answers
11 views

Using Protected Component for “Secret Protection” with Unlocked Packages

How do "Protected Components" (Custom Settings or Custom Metadata) function when installed from an Unlocked Package. I was hoping that I would be able to use as "Protected (Managed)" to store "...
1
vote
1answer
40 views

Do custom settings org defaults behave inconsistently in validation rules and flows?

We have a custom setting with multiple fields which we use in validation rules and flows. One of the fields in the setting is "Validation Enabled" which we use to disable validation rules to allow ...
6
votes
1answer
88 views

How to fix two categories of UNABLE_TO_LOCK_ROW errors in Apex tests running in parallel?

I'm taking a look at running 300+ test classes in parallel again today. The main error - in about 5% of the test classes - was: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record ...
1
vote
2answers
38 views

Custom Label, Custom Setting or Custom Metadata Type for a simple URL

In one of my orgs, I have a simple Visualforce page with just an iframe inside. I don't want the URL to be hard-coded. I didn't develop anything else in this org. To store this simple URL, which one ...
0
votes
0answers
19 views

Access Managed Package settings for users without a license

Our managed package contains a trigger that gets executed every time a Lead is updated or inserted. We want to allow our users to disable this trigger based on some custom setting in the managed ...
1
vote
1answer
44 views

Using Custom Metadata Type in Email Template

I am wondering to know if it is possible to use a Custom Metadata Type inside an Email Template. I'm moving from Custom Setting to Custom Metadata Type and this feature could be great. Regarding the ...
0
votes
1answer
70 views

Retrieving Values from Custom Settings based on 2 field combination and how to retrieve in trigger

I have 4 fields on my custom setting record type name, record type id status send email notification type Now i have to create a new record based on the case status and status combination like ...
3
votes
1answer
22 views

How to I add hierarchical custom setting for Automated Process user?

Given a hierarchical custom setting and a desire to include an entry for User = Automated Process, when I use the UI, I get this error:
0
votes
1answer
16 views

Dynamically switch community login url between enviornments using apex

I need to send an email using apex that contains a link for the email recipient to login to a specific community. I'd like this link to change between my sandboxes and production. What appears to me ...
0
votes
1answer
13 views

i am displaying account fields using vf .according to profile fields should be display?

Based on profiles fields should be display like system admin can see all the account fields other profiles will see limited fields how can solve this by using custom settings?
0
votes
0answers
20 views

how to use .getvalues with map and display the picklist value from custom setting on VF page thoghing null pointer exception [duplicate]

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
0answers
35 views

SOSL Returning 0 Results For Custom Setting Objects

We have been using SOSL to query a list of countries defined as a custom setting which was working fine until recently. I have also tried SOSL on other custom setting objects and getting 0 results as ...
0
votes
2answers
47 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
0answers
26 views

how to display picklist values which is stored in custom settings values based on the condition [duplicate]

` public List getTR_ProductList() { system.debug('******Start of getTR_ProductList'); List options = new List(); options.add(new SelectOption('','--Select--')); Map Prod = ...
0
votes
1answer
20 views

Compare Lead Statecode field to Custom setting Statecode and update a field on Lead with the Region

I have a custom setting name "StateAbbreviationsInfo" which has fields of Statecode__c and Region__C. The requirement is to create a batch class and check for the lead statecode and find the ...
1
vote
2answers
81 views

How do I able to change custom setting values from test class to actual class

I found a problem that couldn't change custom setting values through test code To prevent recursive call, in the middle of context put switch code like below (trigger only runs when custom setting ...
1
vote
2answers
184 views

Would Refreshing a Sandbox Wipe Out Certain Metadata?

If I have custom-setting metadata (or any other custom objects) in a partial-copy sandbox and not in production, then I refresh the sandbox, will that metadata be wiped out and have to be recreated? ...
0
votes
1answer
100 views

pad block corrupted apex Crypto

I am facing an issue while decryption of value which is stored in custom setting. When i encrypt and decrypt value at same time then i that error is not thrown, if i get the value from custom setting, ...
0
votes
1answer
20 views

Want to fetch field from AggregateQuery

I created a Custom Settings and add some records in it. On the basis of that value i write an aggregate query and i want to store that field value in String. // List to fetch all records from ...
2
votes
1answer
67 views

Best way to save a API integration password

I am building an integration between Salesforce and other application with REST API calls. The Salesforce will be consuming data from that other app on in interval. I am writing my code and it is ...
1
vote
1answer
15 views

custom settings to set event reminder

I'm trying to put (-60) value in the reminder time. it works but it is hard coded. I want it from custom settings so admins could edit the numbers from the GUI. trigger setReminderEvent on Event (...
0
votes
1answer
19 views

Hierarchy getInstance() method in VF Page

Is it possible to use Hierachy custom setting getInstance(userId) method in VF Page? I am trying to use below syntax but it is giving an error (Syntax error) {!$Setup.customSetting__c.getValues(...
0
votes
1answer
17 views

How to use custom Setting values as a picklist in the VF page!

Scenario : As per the business requirement there will be a Picklist values in the VF page from which user can transform the Whole page in his preferred language. Please let me know if we can handle ...
0
votes
1answer
35 views

Apex Custom Settings Question

I have read the developer guide and not sure what I am doing wrong. I am executing the following code: public class LTRORequireAdditionalDocumentsCon { public LTRO_Document__c ltrodoc {get;set;} ...
-3
votes
1answer
31 views

How to compare list custom setting records with other list of lead?

How to compare list custom setting records with other list of lead? //this list store the list of lead records List<Lead> leaddetails=new List<Lead> leaddetails(); //This custom setting ...
1
vote
0answers
168 views

Alternative to custom settings in salesforce

I have a problem statement where I need to store a list of some 40 Parent Objects Ids statically. Further, if any one of the Parent Object's child records goes higher then 45,000(which is calculated ...
0
votes
2answers
94 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
27 views

Need Help with a custom Setting

i have a custom setting with a field type "checkbox" set to true but if i try to query it on a class it's allways returning false, i don't know why. Email_Engine__c ee = Email_Engine__c.getInstance();...
4
votes
1answer
1k views

Eliminate query on Custom metadata type?

I'm trying to use Custom metadata type to replace a List type Custom settings. I have to access the Custom metadata type information in multipe apex classes and triggers. When I use custom settings, ...
0
votes
1answer
357 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
1answer
21 views

Store data on custom setting fields

I am looking to store few fields in custom object with fixed values for http request authentication. I see that I can use Custom setting Fields to do that. However, I am not getting an idea how can I ...
1
vote
1answer
26 views

Custom Settings and Rounding in Formulas

I have some formulas that use values stored in custom settings. For example If(X < custom setting-y && x >= custom setting , 'foo', 'bar') My formula seems to be fine and my custom ...
1
vote
2answers
109 views

Can ISNULL be used with custom settings in formula?

I want to evaluate a workflow rule based on a custom setting value. The custom setting can be null so I want to check for isNULL before fetching the value of the custom settings field. This is the ...
4
votes
0answers
102 views

Datetime field default `now()` causes “value not of required type” error?

Per this answer, and everything I know about Salesforce formulas, if I want the default value of a datetime field to be the current time, I should be able to use the formula now(). In this case, the ...
2
votes
2answers
163 views

Are Custom Labels Cached?

There was a requirement to store some key value pairs that will be frequently accessed and the current setup is that is being stored in custom labels. I was wondering if there is any evidence of ...
0
votes
1answer
56 views

Custom Settings in test classes for Lookup fields(ID)

I have a custom setting where I store Id's for my dock records. (Dock__c) In my test class after "creating" the custom setting and my other records, how can I reference the custom setting to match my ...
0
votes
1answer
30 views

Run schedule after saving custom setting's data. Is it possible?

I am having difficulties in custom settings. Is it possible that I can run a schedule after saving the client's credentials? I am using custom settings and the type is hierarchy. Am i gonna create ...
0
votes
1answer
70 views

Assigning Custom Setting value to Custom object Field

/***********Custom setting **********/ Map<string, CountryCO__c> codes = CountryCO__c.getAll(); string pb; list<string> pb1=new list<string>(); for (...
1
vote
0answers
37 views

Duplicate Values Error with Visualforce Form

I am trying to create a Visualforce page / form that displays certain custom settings are subject to frequent change and allow the admin to update the values. I wrote the first section but I get a ...
0
votes
1answer
262 views

how to get all the fields of a custom setting in soql?

I want to access all the fields of a custom setting via soql? any ideas how to do it.
1
vote
1answer
42 views

Custom setting permissions- Standard User

Created a Custom setting to store the Values and Deleting setting records as well based on User's selection, everything was perfect until We logged In with the Standard platform License, We couldn't ...
3
votes
2answers
70 views

Validate if a custom object or custom settings is used anywhere

Which is the best possible way to check if a custom object or custom settings is used anywhere in the project? We are doing a cleanup task of deleting custom objects/custom settings.
3
votes
2answers
79 views

Replacing hard coded messages inside Lightning JS controller

I have existing code which contains upto 20 hard coded messages(info, error etc.) inside my lightning JS controller. I am confused whether to use custom labels or custom settings as part of code ...
0
votes
1answer
34 views

Compare field to large list within Salesforce

I have a large list of email domains that I would like to use for comparisons within some apex code (for example, does the Contact's email domain name exist in this list). What is the best practice ...