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
1 answer
31 views

Need to change appearance of LWC based on a record's field

How to store an information that let users to change the LWC's appearance dynamically? The user can define rules like: If that field's value is "X", appearance should be "A" and/...
user avatar
  • 29
1 vote
1 answer
36 views

Custom lable/settings/metadata in email templates

Is that possible to use a Custom Label/Settings/Metadata inside an Email Templates by referencing? instead of creating a formula field as it was suggested here
user avatar
  • 6,614
-1 votes
1 answer
35 views

How to assign a value to to a field stored in a custom setting?

I'm building an app and I'm giving users the ability to select a specific field to populate from a list of all of their fields. I'm storing that field's API name in a custom setting. I want to create ...
user avatar
1 vote
1 answer
22 views

Does custom setting fields value changes shows in setup audit trail?

Does custom setting fields value changes shows in setup audit trail ? I don't find changes in audit trail.
user avatar
0 votes
1 answer
46 views

Can we create record of Custom Setting if users doesn't have ' Customize Application' admin permission

I have a custom profile having license Salesforce, I have created a Custom Setting with label 'User', I have added my custom setting to 'Enabled Custom Setting Definitions Access' of newly created ...
user avatar
0 votes
0 answers
15 views

how to clear Field Level Security update for custom setting?

I have written an apex class that is using custom settings and it is running on the different users (Not System Admin). when I am trying to scan it using the salesforce scanner it's giving me the ...
user avatar
2 votes
0 answers
52 views

Custom setting insertion contributing to Lock Row exception which finally causes to ConcurrentLongRunning Transactions

We recently faced ConcurrentLongRunning exceptions in our org. We resolved a few rest entry points which SF Support team suggested but few I am not sure if SF Support team analysis is correct. We have ...
user avatar
1 vote
1 answer
61 views

Why creation of Apex Trigger on Change Event for Custom Setting fails if it is available in the picklist?

Change Event for Custom Settings is available in the picklist to create Apex Trigger, but when you try to create an Apex Trigger on that, it fails. Why?
user avatar
  • 13.3k
0 votes
1 answer
68 views

How retrieve Default Org Values from Custom Settings to Visual Studio?

We want to change our 'Default Org Values' in our repo, but we don't find the option in Visual Studio. We are using Visual to upload the code to AWS and need to change this. We tried to include the ...
user avatar
0 votes
1 answer
89 views

How to use Custom Settings or Custom Metadata to dynamically add fields to code

I have written apex code to copy the data of a few specified fields from Order record to Order Line Item record when their values are modified. The problem here is every time a new field has to be ...
user avatar
-1 votes
1 answer
58 views

Cannot See Validation Rules

My boss has asked that we modify all validation rules in our org. We’re creating a custom setting that will allow admins to bypass all validation rules (validation rules will not apply to admins in ...
user avatar
1 vote
1 answer
418 views

what should I use for the default no-reply address?

I am confused about Special Purpose Organization-Wide Email Addresses. By design, a no-reply address is one that human beings don't check the inbox, but Salesforce requires us to click a verification ...
user avatar
  • 303
11 votes
2 answers
358 views

Is it possible to get a Custom Setting without the cost of a SOQL query and at the same time do it DYNAMICALLY without hardcoding the setting?

Once I had the illusion that accessing custom setting is always free and does not consume any governor limits. Until today: I've learned the hard way that this is only half-true. It is true, that this ...
user avatar
  • 33.6k
4 votes
2 answers
91 views

Is it possible to have an APEX Testmethod to see SOME, but not ALL data?

Usually I only need @isTest(SeeAllData=false) But now I need to see some Custom Settings (they count as "data", too). And at the same time I must ensure to see only the Custom Settings, but ...
user avatar
  • 33.6k
1 vote
0 answers
26 views

Target Org Community user unable to access Protected custom setting in Managed package

We have created a custom lightning component for one of our client who are utilizing our Managed package. We are calling a managed package global apex class from this custom lightning component where ...
user avatar
1 vote
1 answer
96 views

How to encrypt customer data in managed package so that the package developer cannot see it

I have a requirement to store sensitive customer information in a protected custom setting in our installed package. From my understanding through this answer the information should be encrypted ...
user avatar
  • 2,586
0 votes
0 answers
52 views

Allow guest user to use a hierarchical custom settings

I've been building a trigger handler and I need to exclude specific profiles from trigger execution. So I created a hierarchical custom settings, in order to have a record for every excluded profile. ...
user avatar
0 votes
0 answers
62 views

Default values for percent type custom setting field incorrect when clicking new in manage

I have a custom setting with a percent type field, which has a default value set (0.25). In apex, if there is no Custom setting for the user, getInstance gets back the correct default value of 25%. ...
user avatar
  • 124
1 vote
1 answer
131 views

How to store setting at User Level?

I have a requirement to showcase a detail page having multiple Accordion sections which are closed by default. Now there will be a checkbox which will allow the user to make sure that all the ...
user avatar
0 votes
1 answer
66 views

Can we use custom setting to restrict access for a user?

Can we use hierarchical custom setting to restrict a particular user from deleting object record. The profile has Delete permission on profile for that object. And it should not be changed as per the ...
user avatar
  • 7
0 votes
1 answer
108 views

Multiple users and concurrent transactions

I have a client who wants us to build a custom auto-number function that applies only to a certain type of campaign record. They want to append the number to a text field for that specific campaign ...
user avatar
  • 6,360
0 votes
1 answer
198 views

"Variable does not exist: $CustomMetadata" When referencing custom setting data in Apex

I created a List Custom Setting with fields that stores default date values. I want to use it in my Apex code (trigger handler), but I have getting the error "Variable does not exist: $...
user avatar
  • 5
1 vote
1 answer
24 views

Help with Test Failure

I have a trigger that will update campaign members to responded for specific campaign after a specific lead status gets updated in the lead, and this value is specified in custom settings. My ...
user avatar
0 votes
1 answer
72 views

How can I order the Fields of the Custom Settings with Sort() method?

This is the method @AuraEnabled public static list<documentEntity> GetDocumentsInfo(){ try{ List<DocumentType__c> documentList = DocumentType__c.getall().values(); list&...
user avatar
0 votes
2 answers
436 views

How to add key value pair in custom settings in Salesforce?

I am trying to add key-value pair in the Custom settings, but I don't know how to add that in the custom settings in salesforce.? { label: 'ABC', value: 'ABC' }, { label: 'CDE', value: 'CDE' },...
user avatar
0 votes
1 answer
800 views

Schedule triggered flow not running for all Resources

I have a schedule triggered flow that runs weekly on the Resource object. I have a custom setting checkbox which I use to denote whether the flow should run that week or not(bi-weekly pay schedule). ...
user avatar
  • 1
0 votes
1 answer
99 views

How do I fix the error when adding Custom Settings?

My task is to create an LWC component and then add it to a managed package. I was told that to store the API and the key to it, you should use Custom Settings and Custom Metadata Types. No more ...
user avatar
0 votes
1 answer
115 views

testing apex class with custom setting validation

I have this apex class: public class APILogManager { public static Boolean logByEmail(HttpRequest req, String responseHeader, Integer code, String endpoint, String responseContent, String entity){ ...
user avatar
1 vote
0 answers
31 views

Guestimating managed package protected custom setting usage in subscriber org

We are using a managed package that has a protected custom setting that stores some additional information per user. We have 6000 users roughly and our org has 9 user licenses so that means amount of ...
user avatar
  • 471
3 votes
1 answer
340 views

Updating an instance of Custom Setting via DML

So I implemented a callout to an external service where first we should validate that our token wasn't expired. So I implemented a refresh token method, that updated our custom setting where we stored ...
user avatar
1 vote
1 answer
145 views

Can we use custom settings in SOQL queries?

I need to use run a query based on the value in custom settings. Delete_Lookup__c is my custom settings. I need to change the output of query based on the values in custom settings. global class ...
user avatar
4 votes
1 answer
91 views

Alternate of Protected Custom Settings In an AppExchange Managed Package for Large Configuration Data

We have an AppExchange App which needs to connect with an external application via API Calls. API calls need to happen in individual user context and not in a single Integration User context. This ...
user avatar
  • 2,232
0 votes
1 answer
42 views

What values will have the field on Custom Setting when the setting is not set for specified profile

I have a question regarding Custom Settings. I'm implementing a bypass strategy for triggers. I created a Custom setting with one checkbox called Bypass_Processes__c for System Admin. Then in the code,...
user avatar
  • 3
0 votes
1 answer
189 views

Is there a performance difference between Custom Settings vs Custom Objects? [closed]

Specifically, is it faster to query for a single record from a Custom Setting vs a Custom Object? Or is it about equal performance?
user avatar
  • 97
1 vote
1 answer
1k views

Error: Too many DML statements: 1 AND Apex methods that are to be cached must be marked as @AuraEnabled(cacheable=true)

I have an AuraEnabled apex method which take a value and does a callout to get an Access Token and Refresh Token, stores them into Custom Settings and then returns true or false based on the outcome. ...
user avatar
  • 8,292
0 votes
1 answer
135 views

Export records from Salesforce to deploy to another org which are useful for configurations like Custom Settings

I have retrieved the metadata from sandbox to deploy it to the higher org using ANT. ANT have created folders for all the components like objects, classes, etc. But, it did not retrieved many records ...
user avatar
  • 1
0 votes
1 answer
274 views

Compare Text Field to Custom Setting Values

I have the below line that compares 2 text fields on a custom object to see if they contain specific values: if(Object.Notes__c != null && (Object.Notes__c.contains('Value1') || Object....
user avatar
  • 1,183
0 votes
1 answer
1k views

Export custom settings data

is there any simple way to export custom settings' data? I can import them by Data Import Wizard, but how can export them as a .csv?
user avatar
1 vote
1 answer
662 views

SFDX source:retrieve Custom Settings from Org?

From within a vscode SFDX project, I'd like to retrieve and eventually manage / set custom settings from within my project. Command that I'm using for this is a standard CLI call of source:retrieve - ...
user avatar
  • 143
4 votes
2 answers
199 views

Custom Setting proxy class, how to make its operation transparent outside of tests?

It's been fairly well established1, 2 that inserting/updating custom settings in a unit test hurts several aspects of the test: Makes tests take longer to execute Makes it hard to run tests in ...
user avatar
  • 48.3k
1 vote
1 answer
422 views

custom settings in apex

how can I get value of my custom settings PrefixGroup__c before insert record in Apex class. This is my code but is not working. Map<String, powerBI_authentication__c> setting = ...
user avatar
0 votes
1 answer
300 views

Is there some standardized way to ensure custom settings are not automatically cloned into Sandboxes?

Among other things, our custom settings include URLs for production servers and credentials to access those servers. Arguably, some of these things should probably be Named Credentials, but the ...
user avatar
0 votes
0 answers
79 views

Custom Settings allow limit is 0MB in Sandbox

I try to update Custom Settings in my sandbox org. And I meet CUSTOM_SETTINGS_LIMIT_EXCEEDED error message. I found Custom Settings in my Sandbox allow limit is 0MB. Please see follow picture. How ...
user avatar
  • 131
0 votes
0 answers
169 views

Custom Setting read and write access

I have a lightning component in a Beta Managed Package that uses a Custom Setting to define in which unit a value is shown. When using the component, the user has the option to click on a button that ...
user avatar
  • 53
0 votes
0 answers
48 views

Accessing custom settings from managed package global class

We have global class in managed package so users can create a visualforce page and refer that global class we exposed. from that visualforce page global class we are trying to access the protected ...
user avatar
1 vote
1 answer
89 views

Managed Package - Protected Custom Setting for storing creds - Security review

I have created a managed package where I used a protected Custom Setting of hierarchy type to store some user credentials. I am concerned about security review of the app. Is there any chances of ...
user avatar
0 votes
2 answers
125 views

Arranging Custom Fields in Custom Settings

Is it possible to arrange custom fields in a custom settings object? I have an object in custom settings (MyCustomSettings__c) and I'm creating custom fields. I'd like these to be arranged in specific ...
user avatar
0 votes
1 answer
86 views

Issue accessing Custom Setting when instantiating Batch Class

I'm having issues returning values in a Custom setting (Type = List) when I'm instantiating a batch class, and I'm not sure why. I'm doing an upsert in my test class and confirming via system debug ...
user avatar
1 vote
0 answers
78 views

Is our "Identity Server" a Good Use Case for Named Credentials and if so, how should I use Named Credentials Instead?

We have a collection of microservices hosted on Azure. In order to access these, we must first get a token from what's been described as the "identity server". I can use this code to get the ...
user avatar
1 vote
0 answers
26 views

Is there a way to hide Custom Settings and Metadata Types to Profiles? [duplicate]

Is there a way to hide Custom Settings and Metadata Types to Profiles? Thank you in advance! :)
user avatar

1
2 3 4 5
10