Questions tagged [fflib]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
35 views

Do we have to force all FFLIB classes with `with sharing` keywords to pass security review?

I'm using FFLIB classes in my managed package and i just wanted to know if i should mark FFLIB classes use in my package with with sharing keyword to follow security review requirements ? Thanks,
4
votes
1answer
46 views

How to mock App Exchange package's API response?

I am using an app exchange package in my code, they have exposed a few global methods that I can use to get my job done. It all works beautifully. The issue comes with testing. I want to test ...
0
votes
1answer
83 views

Doing something dumb with queryfactory and relationship query

I've been using the fflib pattern in salesforce development since before the introduction of the query factory. I'm having a problem making a simple relationship query work using the queryfactory. ...
2
votes
1answer
80 views

Pros and cons of fflib-common-apex for ISV

This question is aimed to summarize advantages and disadvantages of using fflib-common-apex for developing managed packages for AppExchange. Overall fflib-common-apex and mocks are helpful and speed ...
2
votes
2answers
260 views

fflib selector - configure Read and FLS - fflib_SObjectSelector vs fflib_QueryFactory

We're working on a managed package and planning to list it on AppExchange. We are using the fflib-apex-common library in our app. Now the question: what's the best way to configure Read and FLS when ...
2
votes
2answers
22 views

Which unit tests should check read access for user?

We are using fflib-apex-common in our project, and we implemented several selectors. By default fflib_SObjectSelector checks for Read permission. But now I am wondering what type of tests, and at what ...
1
vote
1answer
219 views

FFLIB Unit of work. how to register a relationship on both new and existing record?

I have been trying to use the FFLIB enterprise service layer module to both insert a new record and update an existing record while registering relationships between both but I am unable to update the ...
1
vote
1answer
877 views

fflib apex common Usage [closed]

We have a existing salesforce implementation, we have most of the logic in triggers and trigger handlers. We are still using classic and no mobile or other UI. But still we are planning to implement ...
0
votes
1answer
69 views

How to add mandatory where clause in SObjectSelector subclasses

I have a Product selector class and would like to enforce a mandatory check on a Product field for every query on products. I'm assuming it has something to do with the QueryFactory, but since there ...
5
votes
1answer
168 views

What value is there in an Application Service Provider

As I implement Andrew Fawcett's, Apex Common library referring to the fflib-apex-common-samplecode when necessary, I note that his ObjectService classes (i.e. OpportunitiesService.cls) are really more ...
4
votes
1answer
332 views

Apex Enterprise Patterns: Should UOW only be used with a DML transaction?

After completing the Apex Enterprise Patterns (AEP) trails from trailhead, there are a few questions that I have. One being, when is it necessary to use the Unit of Work (UOW) layer? Considering it is ...
1
vote
1answer
1k views

Salesforce Selector layer - subquery

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://...
-1
votes
1answer
430 views

Warning when using fflib_QueryFactory

When performing a sub query, I get the following message: WARN|fflib_QueryFactory.subselectQuery(Schema.SObjectType) is deprecated and will be removed in a future release. Use fflib_QueryFactory....
2
votes
1answer
624 views

fflib_ApexMock: How to mock static methods?

Static methods are called without creating instance of a class. The fflib_ApexMock library gives option to mock, but how to call static methods when mocking a class. Like in Mockito we have ...
2
votes
2answers
1k views

Stuck on Unit of Work Principles test in Trailhead

I am working on the Unit of Work Principles trailhead and seem to be stuck, I cannot get it to pass even though the test passes. I surmise it may be because it is testing other tests and looking for ...
1
vote
1answer
227 views

how to prevent recursive trigger when using the financialforce enterprise design patterns library?

Trying to implement the popular Financialforce enterprise design patterns library, and not clear on if it provides baked in capability to prevent a trigger recursion. I've looked through the core ...
1
vote
1answer
427 views

Hello World for APEX Mocks

I am working on a project in which we need to test an APEX REST Service in such a way that no actual data is created in Salesforce during the testcases execution. I am new to APEX Development. ...
4
votes
3answers
475 views

How to unit test service layer without DML

Looking for best practices/suggestions on how to unit test a service layer method that creates new records based on input without having to issue the DML. An example would be ...
2
votes
1answer
271 views

Getting error when trying to use fflib

I am trying to learn fflib, in this i do have 3 layers Service, selector and domain level. I am getting a list of opportunity records to display on VF page using selector and I have added all these ...