Questions tagged [bestpractice]
Referring to the use of recognized community and platform best practices. May relate to all areas of lifecycle and all development and administration activities.
425 questions
0 votes
0 answers
57 views
Impact of Special Characters in Composite Keys for Custom Metadata
I have a custom metadata table that stores different combinations of field values, including picklist values that contain special characters like quotes (", ') and semicolons (;). Current Setup ...
0 votes
0 answers
48 views
B2B Commerce: Best Practice for product visibility
we have customers that own one or more assets. Each asset is a large machine that is individually configured. In our B2B commerce shop, customers should be able to order spare parts and consumption ...
0 votes
2 answers
116 views
How expensive is this operation to get type of object?
I am doing an update an opportunity from a event, in the trigger I have this List<Opportunity> opportunitiesToUpdate = new List<Opportunity>(); for(Event anEvent : events) { if(String....
1 vote
3 answers
303 views
Before Trigger - Validate data prior to assigning?
I'm wondering if there's any benefit to adding an if statement to check if data changed prior to modifying in a before trigger (assuming I'd always want that specific value). The example below is ...
1 vote
1 answer
538 views
Best Practice - Dynamic SOQL or Static Query within if/else
I'm wondering what is the best practice in a situation where I have a conditional query - do I use an if/else to create my query string and use dynamic query in one place, or use static query and ...
-1 votes
1 answer
172 views
Can we call apex method with the same name but with different letter case in another class?
Can I call a method in another class with the same method name but with different cases. For example a method testMethod() is in classA. And itsl is called as ClassA.TestMethod() in ClassB. Will it ...
1 vote
0 answers
80 views
How can I Jest Test an LWC without relying on implementation details and assuming extended HTML does its job?
I have this test: it('handles errors from getDummyApiUsers', async () => { // Arrange const mockError = new Error('Simulated error from getDummyApiUsers'); ...
0 votes
0 answers
156 views
SF Campaign Naming Conventions for Evergreen Campaigns
I'm wondering if anyone has suggestions or best practices for campaign naming conventions when it comes to evergreen campaigns or campaigns that run beyond a single fiscal year. Currently, my company'...