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
0answers
21 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! :)
3
votes
1answer
44 views

DX CLI - Custom Settings

I've not found conclusive answers around DX and deploying/retrieving custom settings in a sandbox or production org. I did see this: DX Orgs and Custom Settings But that post is over a year old at ...
0
votes
1answer
24 views

Unit Test - When one Test Method called another Test Method within the same class

I have a scenario in which i am not sure how to write Unit Tests, Please assist me on this. Public class FilePreview{ public static fileClass getFilefromAWS(String str){ //Logic for ...
0
votes
1answer
14 views

How to update existing records on change custom setting field value?

I have a trigger on the Account object and custom setting. I am comparing the account object's "Account Potential" field with the custom setting's "slab Maximum" and "Slab ...
0
votes
1answer
34 views

Autonumber with custom setting

I have a custom setting to numerate the opps by year. When an opp is insert, it fires a trigger that call to the method 'renombrarOppEmpresa'. I look for the record of the custom setting per year, I ...
2
votes
0answers
88 views

How can I detect in Apex code that a user has or doesn't have access to the custom setting?

I have created a new Custom Setting Test__c and enabled feature Restrict access to custom settings in Schema Settings. Now I expect that a code in user context (Anonymous Execution Window) would ...
0
votes
1answer
25 views

List View based on current logged in user criteria

I am creating an app where there should be a list view of users of that org. I have created a custom object which looks up to the User object. Based on some criteria of the current logged in user for ...
0
votes
0answers
18 views

How to manage Custom Setting data from Community at user level

I have Created one custom setting with email digest feature which sends a mail to user through batch classes as per record value stored For Ex- If Internal user stores as Email Digest Daily then he ...
0
votes
0answers
33 views

Custom Setting vs. Custom Object vs. Custom Metadata Type for Multiple Environment Credentials [duplicate]

I am looking to confirm the best practice of storing client / secret credentials for multiple environments for multiple external webservices within salesforce. Below is the analysis I have done ...
3
votes
1answer
127 views

Securely Storing Oauth Credentials for Apex Callouts

I am again trying to understand what is the best possible option to securely making the apex callouts from a trigger to external application which supports OAuth2. I am not building any application/...
3
votes
0answers
27 views

How to make existing custom setting searchable?

I have one custom setting in our org which is not searchable, as verified by confirming that searchable = FALSE when viewing the object info via Workbench. Dozens of other custom settings in our org ...
1
vote
1answer
37 views

“Internal Salesforce.com Error” in Apex called by LWC, but only for non-sysadmin users

I have this class, which is used by a VisualForce page for a couple of years. It accesses a custom setting named Data_kwaliteit__c: public class MainPageController { ... private Data_kwaliteit__c ...
0
votes
0answers
20 views

Lightning Component Reading Checkbox from Custom Settings

I've created a Checkbox in a Custom Settings object so my Lightning component can perform an action, but I'm unsure how to actually read the checkbox in Lightning. My Apex class is calling the ...
3
votes
0answers
53 views

How to use the Feature Management App (FMA) to grant access for a defined number of users?

The FMA allows named booleans, integers and dates to be set by the creator of a managed package so they can turn package features on and off per customer. The boolean option is pretty obvious: every ...
0
votes
1answer
36 views

how to run apexcode with diff user context

please share your idea's my salesforce org integrated with serviceNow system middle ware is snapLogic . I created one api user in salesforce (i.e Integration User). when record inserted in servicenow,...
0
votes
1answer
89 views

Cannot find “Custom Settings” in Org Browser (Visual Studio Code, SFDX) [duplicate]

I creating a Custom Setting in a sandbox, called Global Settings (Global_Settings__c). I am trying to pull the Custom Setting into my SFDX project via Visual Studio Code, but "Custom Settings" does ...
0
votes
1answer
20 views

How meta data looks like after the custom setting definition added to profile?

We enabled this to dev org. I am trying to add 'XXXX' custom setting to admin profile. I am trying to pull profile metadata using workbech. I am unable to see any new changes regarding this salesforce ...
0
votes
1answer
16 views

How can I enable the permission within SetUp tab, to give access to an user to write a comment into a Case

I created a case and I want another user to be able to comment on it, but when he tries to do it a notification shows up saying that he does not have the permissions to do it. What is the permission ...
0
votes
1answer
33 views

Custom settings in tests if it's trigger

I have a trigger with custom settings and test for it. And I have an example how to test it right: @IsTest void testWithSettings() { Example_Settings__c exampleSettings = Settings.getExample(); ...
1
vote
2answers
359 views

How to retrieve Custom Settings from Sandbox to a local SFDX Project?

I want to know how to retrieve Custom Settings from my Sandbox into a local sfdx project. I know command force:source:retrieve but I do not know what parameter to use for retrieving Custom Settings. I ...
1
vote
3answers
45 views

The custom setting parameter in unit tests is NULL

I'm getting null in my code here, while running a unit test, but in Execute Anonimous Window there is a right value in System.debug(). What the hell? Maybe I should run the test as System ...
1
vote
1answer
53 views

What is the use of “View All Custom Settings”?

Due to Spring 2020, we now have this new setting 'View All Custom Settings' in the profile. As I understand it, if this is not checked, then users of that profile will not be able to access any Custom ...
0
votes
1answer
73 views

Is it possible to increase the length of Name field in Custom Setting

I am passing dynamic values to the getValues() method so I didn't have control of what is being entered, whenever name string crosses 38 characters its giving "Custom Setting Name too long" error. So,...
0
votes
0answers
45 views

How to add access for custom settings with protected visibility in 'Enabled Custom Setting Definitions Access'?

I have a managed package with custom settings and one custom setting has a protected visibility since we are storing my user's API key and secret key. We have users who have users who don't want to ...
0
votes
1answer
35 views

How to add permissions for custom settings/metadata for managed package

I have a managed package that are using custom metadata and custom settings and I want to use permission sets so we can control the access permission of these custom metadata and custom settings. I ...
0
votes
1answer
41 views

Unable to set default custom settings

I have written an apex class which makes a callout to an external API, and the endpoints need to be different for the sandbox and production. I need functionality like environmental variables so the ...
0
votes
2answers
108 views

How to provide MetaData access for Spring '20 programatically?

I am new to profiles and permission sets. I have identified a list of metadata that I would need to give access to for certain profiles. Please see: https://help.salesforce.com/articleView?id=...
0
votes
0answers
19 views

How do i update Hierarchy Custom Settings fields if the field's api name matches with UserRole DeveloperName?

Background We have a Action on Case with ActionType: Send Email where we are populating HTMLBody with user's signature under Predefined values Section. We also want to add tag line at the end of the ...
10
votes
1answer
254 views

$Setup cannot resolve protected setting in managed package after Spring 2020

A custom button in a managed package uses a protected custom setting in the same package to retrieve a namespace: /apex/{!$Setup.Constants.URL_Namespace__c}PageName?param=value When installed with ...
2
votes
1answer
97 views

Custom Setting Access

I have 2 public list custom settings. Both can be exposed via the Custom Setting UI and Apex with the Customize Application permission. However, without that permission 1 of the Custom Settings is ...
0
votes
1answer
42 views

Test Class Get Custom Setting Value Dynamically

I have created a Custom setting as follows Label: MyDomainURL API Name: MyDomainURL__c Visibility: 'Public' Setting Type: 'List' Custom Field: MyURL__c I have referenced this in my Apex test ...
1
vote
0answers
25 views

VF Page unable to show Custom Setting Value when accessed from Live Chat

I have fetched certain data from Custom settings and used them in a VF Page.When the vf page is previewed it shows the values in the picklist of vf but when the vf is opened from Live Chat.It shows ...
0
votes
1answer
50 views

Is it possible to add the all standard and custom objects list to the custom settings and use it in batch apex?

We are doing full org deployment, we need to update the record owner to system admin for all the objects records. So initially we created batch apex to implement this for accounts object. But we have ...
-1
votes
2answers
42 views

Use protected hierarchy custom settings to store sensitive information

We are thinking to store sensitive user specific keys in protected hierarchy custom settings. Is this secure place where only user can access data. We don't want this data to be visible to anyone ...
-2
votes
2answers
63 views

System.NullPointerException: Attempt to de-reference a null object error in test class

I am getting null pointer exception while creating a test class for schedule apex static testMethod void testMethod2(){ test.startTest(); Settings__cPS = new ...
2
votes
1answer
811 views

Is there an @salesforce import or uiRecordApi service for custom settings in LWC?

I have an LWC that needs to use a value from a (hierarchy) custom settings object, when available. I know I can write an Apex method and call it via a wire to address this, but I was hoping to find ...
-1
votes
1answer
58 views

Synchronization object in Apex Class during concurrent calls

For working with Call Logs (Task object) to create and for updating I use OpenCTI and hierarchy custom settings as a cache to keep created TaskId. I have two methods in Apex Controller: when I get ...
0
votes
1answer
332 views

Custom setting deployment

I have a custom setting called CAT_Custom into which i have a URL field called CAT_URL. I have different values for this URL field in both PROD and in STAGE environments. Now when i deploy this ...
0
votes
1answer
25 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
14 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
44 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
68 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
37 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
905 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
49 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
428 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
202 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
55 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
51 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
744 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 ...

1
2 3 4 5
10