apex-enterprise-patterns / fflib-apex-common

Common Apex Library supporting Apex Enterprise Patterns and much more!
BSD 3-Clause "New" or "Revised" License
899 stars 514 forks source link

Add short-circuit for currency detection #429

Closed jefersonchaves closed 1 year ago

jefersonchaves commented 1 year ago

Uses isMultiCurrencyOrganization before attempting to check the object. Removes code duplication with multiple checks for UserInfo.isMultiCurrencyOrganization(). It also can help to make the debugging easier by using variables for the fieldsMap.


This change is Reviewable

stohn777 commented 1 year ago

@jefersonchaves In my efforts last week, I overlooked an experimental change which impacted this PR. Please review my change to your PR. Thanks!!

jefersonchaves commented 1 year ago

Hello @stohn777: thanks for the review. It seems that a 2nd review is required and I'm not authorized to merge, so I leave this up to you peeps.

stohn777 commented 1 year ago

@jefersonchaves The original polymorphic test has been failing for a bit. With your PR, motivation was reinvigorated to deal with it too.

You're correct that after further successful review by other maintainers, the PR will be merged.

jefersonchaves commented 1 year ago

Hello @stohn777 - Is there anything else I'm missing, or can I help to move forward?

daveespo commented 1 year ago

A separate PR was opened to address the unit test failure with Mulicurrency orgs -- the scope of this change on this PR was too broad #437