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
0
votes
1answer
20 views

How to add Custom Settings for an AppExchange product programmatically?

I installed an App Exchange product (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000004cSsOEAU) and it allows one to set additional roles as part of custom settings. While it ...
0
votes
0answers
10 views

Customize “My Personal Settings” page for users

I am not seeing the ability to customize the My Personal Settings section for my users with the default setup. Can this be done with code if so any idea where that would be added? For example if I ...
2
votes
1answer
38 views

How to reference parameters outside of Apex Class that can be configured by Administrator

Here is an example of the challenge I have faced multiple times. I was wondering if anyone could offer best practices on how they handle situations like these. I have an apex class that process ...
0
votes
2answers
26 views

How to create multiple test custom setting hierarchy

I am not sure how to create multiple profiles for one hierarchy custom setting. I assume it would look something like this: ConcurrentSessionsPolicyLimit__c defaultLimit = new ...
0
votes
2answers
26 views

Get Picklist Value from Custom Settings in vf page controller

I am trying to fetch the pick list value from custom settings, i am getting Unknown property 'TestList' Error is in expression '{!CTest List}' in component in page this is my method for pick list ...
0
votes
1answer
53 views

Get Custom Setting's field value in Lightning Component

I have a custom setting with API Name: Company_Setting__c. I need to access the value stored in this custom setting in lightning component. I got a field with API Name: Company_Phone__c. Below is my ...
0
votes
1answer
24 views

Can Protected Managed Package Custom Settings be used to store OAuth2.0 Credentials from a Custom Auth Provider?

Background: I have created a custom Auth. Provider in Salesforce to reach out to an authorization server that isn't on the default list of Provider Types. I used https://developer.salesforce.com/docs/...
0
votes
1answer
30 views

Reading Custom Settings in Lightning Component

I'm creating a page to display to users when we are having periodic maintenance and I want to use custom settings to determine if we're "in maintenance mode". I've created a ...
0
votes
1answer
58 views

SOQL returns data even if bind apex variable is null

We have a public custom settings Batch_Settings__c of type Hierarchy (Organisation level) and it has a date/time field called "Last_Run__c". The field Last_Run__c is null, but SOQL filtered on this ...
0
votes
1answer
43 views

Test Class Failing due to NullPointerException

I have stored the SharedSecret and AccesskeyId in a custom setting. The shared secret has reserved characters. This is a sample sharedsecret 'abc'\1@pQr&^%HGF45abcc' In apex code I am ...
0
votes
1answer
41 views

Escaping reserved characters from a string stored in custom setting

I want to get mykey stored in custom setting and escape the reserved characteres. originalstring = 'abc123def'pqr456\eryt' ; // escaping the reserved charatcters String ...
3
votes
3answers
186 views

“System.ListException: Row with duplicate Name at index: 47” error from list custom setting getall()

The following exception started occurring when retrieving all the values from a list custom setting: System.ListException: Row with duplicate Name at index: 47 The code in question for the error ...
0
votes
1answer
38 views

Auto Refresh Access Token

I have written this method to get accesstoken when I send Id & password given(Which I havent Hardcoded Below). I am saving my access token in custom setting and want it to expire, call this method ...
0
votes
1answer
48 views

Invalid Set up owner for custom settings

I am trying to retrieve a custom setting that I made with this code: public static String getCustomKey(){ AP_Mobile_Key__c APMobileKey = AP_Mobile_Key__c.getInstance('AP Mobile Key'); ...
0
votes
0answers
91 views

Hierarchy Custom Setting in validation rule

I have a hierarchy custom setting with 2 custom checkbox fields & 3 profiles. I'm trying to use this profile based value in Validation rule. I have created the OWD on custom setting to be false &...
-4
votes
1answer
73 views

Trigger not creating a new record [closed]

If case status got change for certain record type, new support record should get created. I configured status and record type combination in custom setting I am trying to avoid nested loop in my ...
0
votes
2answers
43 views

Triiger Switched On/Off using Custom Metadata

I want to switch of trigger to run or not based on custom metadata. below is the logic i used ,but getting null exception if no User record in metadata. I dont want triger to fire when user and ...
1
vote
2answers
50 views

how to use set of strings as custom settings?

I have Set in my apex class as below Set<String> removeFields = new Set<String>{'isUpage','email','mobileno','owneremail','comments','Name','isApproved'}; I need to use these ...
0
votes
0answers
48 views

any way to reduce long query in Apex class

I have below query which is checking profile permissions .is there any way if this query can be shortened..like using custom label in SOQL or Custom Setting [SELECT profile.name FROM Profile where ...
0
votes
1answer
33 views

bypass trigger on specific object in salesforce

I need to bypass trigger on account sometime. I have created custom setting for that and added triggerObject__c field. In my code bypassTrigger__c bypass = bypassTrigger__c.getInstance(UserInfo....
3
votes
0answers
108 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
19 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
76 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
54 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
20 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 ...
1
vote
0answers
21 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
46 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
116 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
131 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
28 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
273 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
81 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
49 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
20 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
22 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
43 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
77 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
33 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
192 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
311 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
220 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
23 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
96 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
16 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
20 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
38 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
42 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 ...