Unofficial fflib documentation
pnpm install
pnpm dev
Tabler Icons are used throughout the site.
⚡ Unofficial and semi-opinionated fflib documentation - Apex Enterprise Patterns
Home Page: https://fflib.dev
License: MIT License
Unofficial fflib documentation
pnpm install
pnpm dev
Tabler Icons are used throughout the site.
Summary:
We are experiencing an issue with a trigger utilizing the fflib (FinancialForce Apex Common) framework in our Salesforce instance. The trigger is designed to remove the AccountId from a record when a specific checkbox is checked. However, despite the trigger's logic, the AccountId field is being automatically reassigned due to the behavior of the fflib framework.
Details:
Trigger Objective: To clear the AccountId field when a particular checkbox is marked as checked.
Observed Behavior: Instead of the AccountId being cleared, it is automatically re-assigned by the fflib framework.
Framework: fflib (FinancialForce Apex Common)
Impact: This issue is blocking the completion of a critical story in our development pipeline, potentially affecting our delivery timeline.
Steps to Reproduce:
Check the specific checkbox No Assigned Patient field designed to trigger the removal of the AccountId.
Observe that the AccountId remains or is re-assigned, contrary to the trigger logic.
Requested Action:
We need assistance in resolving this conflict between the trigger logic and the fflib framework's auto-assignment behavior. This may involve adjusting the trigger logic, configuring the fflib framework settings, or implementing a workaround that aligns with our requirements.
Priority:
High – This issue is urgent due to its impact on a critical story in our development process.
Please advise on the best course of action to resolve this issue. Thank you for your prompt attention.
The documentation says to create a ApplicationFactory_DomainBinding Custom Metadata Record, but I'm not sure it's actually used.
I receive errors apparently because I don't have a Binding Custom Metadata Record, but I don't see any instructions on how to create it.
error with no Binding cmr:
di_Injector.InjectorException: Binding for "iapplicationsobjectselector" and SObjectType "Contact" not found
error when attempting to create Binding cmr:
IContacts cannot be constructed
I'm trying to implement this for the first time in a new org. Writing the interface for the Contact object, I get this error:
I'm not finding any place in the documentation to explain how to set up IApplicationSObjectDomain, and wondering if that step was skipped.
public interface IContacts extends IApplicationSObjectDomain {
}
Do we have to just deploy once to our org and then the fflib library will be updated by itself or do we have to deploy again when there are something new?
How to recreate:
`fflib_SObjectUnitOfWork uow = new fflib_SObjectUnitOfWork(MY_SOBJECTS, mockDML);
Account parent = new Account(Name = 'Parent');
Account child = new Account(Name = 'Child');
uow.registerNew(parent);
uow.registerNew(child);
uow.registerRelationship(child, Account.ParentId, Parent);
uow.commitWork();
child = [SELECT ParentId FROM Account WHERE Id =:child.Id];
Assert.isNotNull(child.ParentId);
Assert.areEqual(parentId, child.ParentId);
`
Expected behaviour is that this should pass, but it doesn't. This code might need to be fixed, I'm typing this freely. The solution we found is through an extension class to:
`
public void registerRelationship(SObject record, Schema.SObjectField relatedToField, SObject relatedTo){
if (record.Id == null && relatedTo.Id == null && record.getSObjectType() == relatedTo.getSObjectType()){
record.Id = fflib_IDGenerator.generate(record.getSObjectType());
uow.registerRelationship(record, relatedToField, relatedTo);
uow.registerDirty(record);
record.Id = null;
}else{
uow.registerRelationship(record, relatedToField, relatedTo);
}
}
`
I think it would make a nice addition to the framework
Why we need create instance a domain with a list sObject, and can't create instance a domain using a unique sObject, or with just a sObjectType equals Selector Layer ?
There is a typo in the code.
Instead of
@TestVisible
private String getExtraQueries(Boolean removeFirstAnd) {
String extraQueries =
setFilterIsActive();
return removeFirstAnd ? extraQueries.replaceFirst('AND', ' ') : extraQueries;
}
it should be
@TestVisible
private String getExtraQueries(Boolean removeFirstAnd) {
String extraQueries =
getFilterIsActive();
return removeFirstAnd ? extraQueries.replaceFirst('AND', ' ') : extraQueries;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.