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
0answers
24 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
44 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
71 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
32 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
34 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
151 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
29 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
992 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
18 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
33 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
49 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
425 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
42 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 ...
0
votes
2answers
630 views

How to reset custom settings cache?

I have a hierarchy type custom setting with org level defaults and no user or profile override values. I have changed the org level value for one field, but in my APEX tests, the code still retrieves ...
2
votes
0answers
17 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
42 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 ...
3
votes
1answer
140 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
90 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
52 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
88 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 ...
3
votes
4answers
721 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
0answers
22 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
823 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 ...
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.
3
votes
2answers
688 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
2answers
72 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
74 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 ...
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
674 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()) { ...
2
votes
2answers
671 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
244 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. ...
0
votes
1answer
555 views

Create relationship between custom object and custom setting

Why I can't create relationship between custom object and custom setting. When try to create lookup field in my custom object, custom settings are not listed in available objects.
3
votes
1answer
28 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
18 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 ...
2
votes
1answer
352 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
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
21 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
1answer
380 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 ...
0
votes
0answers
41 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
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
115 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
201 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
123 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
22 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 ...
1
vote
1answer
272 views

Visualforce not loading iframe after update

I had/have a Visualforce page that displays an iframe that points to another page within my organization. It points to the page that renders an email template (like https://prodorg--c.na17.content....