fflib-apex-common
fflib-apex-common copied to clipboard
Building full domain class factory causing issue for site user and partners
we have territory setup requirement on opportunity from trigger. but that create an impact when Site or Partner users are doing something on some other unrelated object because Application domain factory is calling all the domain constructor and SF rejecting it straight way saying Error : Field(Opportunity.territory2Id) is not writeable for Partner User. Is it possible to stop making all domain class at once and do it selectively as required in transaction?
I am pretty sure your asking for on demand creation of something here. I'm just not 100% sure what? Can you provide some more code samples / snippets of the relevant code that you want to be done selectively please?