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
19 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 ...
1
vote
1answer
844 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 ...
3
votes
3answers
179 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
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 ...
3
votes
4answers
780 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
1answer
52 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 ...
3
votes
2answers
731 views

Can we set permission for Custom Setting object for Different Profile

Actually we don't want to show some details to other profile user. I have researched solution for this problem but didn't find a answers for this question.
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
0answers
341 views

Add new record into protected custom setting in a managed package

I've wrote a batch that upsert new record to a protected custom settings. The upsert is written at the postInstall script. Basically, it's something like : public static void setSetting(String ...
0
votes
1answer
29 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
56 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 ...
4
votes
2answers
2k views

How to insert list custom setting entry from a lightning component?

I want to insert a record of custom setting of type List through Lightninng component using form/any other input UI.In doing so through form and using UIInputText, when I am using following markup to ...
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
699 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()) { ...
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 ...
0
votes
1answer
36 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
42 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
1answer
415 views

Updating custom settings fields from XML

Is it possible with Mavensmate to update fields from the XML on a custom settings object? I updated the .object file and in Mavensmate hit deploy to server. It seems that Salesforce did not to apply ...
2
votes
1answer
382 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 ...
0
votes
0answers
86 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 &...
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
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 ...
-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
49 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 ...
1
vote
1answer
156 views

Merge field stored in custom setting

Is it possible to store a merge field like {!Account.Name} as a custom setting, then reference the custom setting on a VisualForce page that uses the standard controller?
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....
0
votes
1answer
1k 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 ...
2
votes
2answers
1k views

How to Upsert Hierarchy Custom Settings While Testing?

I'm trying to update custom settings in my class using the following: public static CustSettings__c settings; public static void updateSettings(){ settings = CustSettings__c.getInstance(); ...
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 ...
3
votes
0answers
106 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
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 ...
3
votes
0answers
462 views

SOSL Query against Custom setting object

I am experiencing some inconsistent behavior. On one org - I'm doing a SOSL (Search Query) against a custom setting and it works fine. But on a different org - I get entity type My_Custom_Setting__c ...
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
20 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 ...
4
votes
1answer
191 views

Can FeatureManagement.changeProtection() be used to Protect any Custom Object?

Winter 18 introduced the FeatureManagement Apex Class, which contained a method which I was not expecting: changeProtection. According to the docs, changeProtection can be used to "Unprotect" objects ...
6
votes
1answer
115 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
124 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 ...
1
vote
1answer
260 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
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 ...
4
votes
2answers
2k views

How to close a case as duplicate or merge a case

I need the option to Merge cases, Has anyone done something similar for Merge cases? I prefer to avoid Apex - but I don't think I have an option here really.
0
votes
2answers
83 views

Editing protected custom settings in subscriber org

I use custom logging for my managed package and have a protected custom settings called logEnabled which acts as a switch to capture logs. I want to be able to use it a subscriber org to capture logs....
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 ...
2
votes
2answers
706 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 ...
5
votes
3answers
246 views

How to differentiate LIST apart from HIERARCHY setting in Apex?

My Apex code needs to dynamically reflect on user-defined Custom Settings. But the user could use a List or Hierarchy depending on their needs, so I need to be a bit careful manipulating each type. ...