Skip to main content

Questions tagged [design-patterns]

A general reusable solution to a commonly occurring problem within a given context in software design

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

I’m implementing the fflib-style Apex Enterprise Patterns in my org and I’m confused about the correct place to instantiate the Unit of Work (UoW). From what I understand: The purpose of UoW is to ...
visefenthu's user avatar
0 votes
2 answers
77 views

I’m learning Apex design patterns and following Trailhead modules. So far, I’ve created base-level selector classes for the Opportunity object and now want to implement the next layer. From what I ...
visefenthu's user avatar
1 vote
1 answer
97 views

To note: I've just implemented fflib and have thus separated TriggerHandler logic from SObject Domain classes. That is, I have (for example) two classes: AccountsTriggerHandler extends ...
Mike's user avatar
  • 1,231
0 votes
2 answers
528 views

We are trying to develop our code using fflib. Can we access relationship fields directly in the child domain class or do we need to use the parent object domain to access the field values and sent it ...
Praveen's user avatar
  • 10.2k
2 votes
4 answers
2k views

I have been asked in Interview that why did I use Design patterns just for one or two methods, when can you use helper classes to get the things done for you. I explained that having Quote with more ...
Pratap M's user avatar
  • 141
1 vote
1 answer
305 views

I'm developing a project using fflib's Enterprise Architecture patterns, based on their example app (https://github.com/apex-enterprise-patterns/fflib-apex-common-samplecode). I am a bit confused ...
mmm321321's user avatar
  • 689
1 vote
2 answers
260 views

I'm setting an an AEP Selector which needs to implement the following: [select ParentId from SetupEntityAccess where SetupEntityId in (select Id from CustomPermission where DeveloperName = :name)] ...
Swisher Sweet's user avatar
0 votes
1 answer
78 views

Why did Salesforce choose this approach with the column definition of the lightning-datatable component? const columns = [ { label: 'Label', fieldName: 'name' }, { label: 'Website', fieldName: ...
Damecek's user avatar
  • 2,083
1 vote
0 answers
487 views

With the latest fflib, the trigger handler and domain logic were separated. I can see from the changes to the repo that previously, the Opportunities.cls domain class' onAfterInsert() method updates ...
Doodool_Tala's user avatar
4 votes
1 answer
1k views

We are implementing Apex Enterprise Design patterns in our org and I'm struggling to understand the difference between fflib_SObjectDomain and fflib_SObjects. There's very little documentation on the ...
Swisher Sweet's user avatar
0 votes
1 answer
115 views

I'm trying to up my OOP game and utilize good patterns where I can. Recently I wrote some classes that essentially take a custom object (a quote) and build a very long/complex api request body using a ...
Carryonplease's user avatar
1 vote
0 answers
531 views

Whilst reviewing The Ultimate Guide to Flow Best Practices and Standards from Salesforce, I saw no mention of any design patterns or best practices on how to handle structuring Record Triggered Flows ...
Swisher Sweet's user avatar
0 votes
1 answer
2k views

tl;dr - What are the advantages of having handler and service methods separate housed in separate classes, rather than joined in a single class. Background Salesforce and others reference using ...
Jwok's user avatar
  • 849
0 votes
1 answer
80 views

I've got a case where different parts of the code need to handle exceptions differently, and was wondering if there is a pattern or a recommendation for approaching the problem. Let me explain exactly ...
Alex Chardouvelis's user avatar
1 vote
2 answers
197 views

I need use structure (or wrapper class) in Apex Enterprise Pattern. public with sharing class Structure { public String name { get; set;} public Integer limit {get; set;} private ...
oldgunner's user avatar
6 votes
1 answer
1k views

I recently joined a new, very large, very old org that is in need of optimization. Previously they had a tendency to create brand new, separate utility classes for each new method being called from ...
Morgan Marchese's user avatar
0 votes
1 answer
467 views

This is in reference to Integration with a System having millions of records. However, due to certain limitation we do not want BULK API needs to be implemented . Although there are other options like ...
stuart Johnson's user avatar
2 votes
0 answers
233 views

We have AccountsSelector class extending ApplicationSObjectSelector abstract class from at4dx library. ApplicationSObjectSelector class has public virtual method getSObjectFieldList() I have ...
Sonali takke's user avatar
7 votes
2 answers
3k views

When doing functional tests I see many people also check the permissions by using System.runAs(userWithRightPermission) in most of their tests. I see good reasons for doing this, because then you ...
Robert Sösemann's user avatar
0 votes
1 answer
902 views

I've seen people opting for singleton pattern (https://developer.salesforce.com/wiki/apex_design_patterns_singleton) while writing trigger handler classes and some simply defining methods in trigger ...
sfdcnewbie's user avatar
0 votes
1 answer
328 views

I'm trying to figure out the best pattern for the code below (example: not actual code). IOpportunitiesA and IOpportunitiesB are extending the base interface and they have a similar method, ...
Andrew L.'s user avatar
  • 893
1 vote
0 answers
150 views

we are moving away from point to point integrations to Mule(API Led integration ) and are in the process of revamping our endpoints and thus having all the endpoints pass through mule anypoint , this ...
user2945545's user avatar
6 votes
1 answer
871 views

Context There are a lot of questions and SF developer blogs related to best practices for trigger. Since several years, I've been following the single trigger object pattern which has a lot of ...
Shamina's user avatar
  • 5,212
0 votes
1 answer
145 views

Hidden Component 3 is a table (not lightning data table.) It is fetched with some data-- but when the text gets too large (even with truncation), the entire component will grow with the table. ...
brownginger's user avatar
3 votes
1 answer
373 views

As for my analysis Not able to render dynamic Lightning Web Component Dynamic creation of the Lightning Web Components is not yet supported. Can someone suggest a better approach to render the input ...
vignesh's user avatar
  • 2,654