Skip to content

When deploying this package to orgs that do not have the Order object enabled, it fails. #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gsuarez-sfdc opened this issue Feb 17, 2025 · 7 comments
Assignees

Comments

@gsuarez-sfdc
Copy link

Describe the bug
When deploying this package to orgs that do not have the Order object enabled, it fails.
Same to this:

To Reproduce

Steps to reproduce the behavior:

  1. Log in to a sandbox that does not have the order object enabled
  2. Try to deploy the package.
  3. See error

Expected behavior
The package should deploy correctly even when the order object is not enabled in the environment.

Screenshots and text of error observed
Deployment Complete
Failures:
deploy/classes/fflib_SObjectSelectorTest.cls(655,11):Variable does not exist: Order
deploy/classes/fflib_SObjectSelectorTest.cls(660,6):Variable does not exist: Order
deploy/classes/fflib_SObjectSelectorTest.cls(661,6):Variable does not exist: Order

Version
Did you try to reproduce the problem against the latest fflib-apex-common code?
Yes.

@ImJohnMDaniel
Copy link
Contributor

ImJohnMDaniel commented Feb 17, 2025

@gsuarez-sfdc -- Thanks for reaching out. I just tried to reproduce the issue but was not successful. The main codebase does deploy correctly. Having said that, what kind of org are you working with? Why does it not have Order and related SObjects enabled?

@gsuarez-sfdc
Copy link
Author

@gsuarez-sfdc -- Thanks for reaching out. I just tried to reproduce the issue but was not successful. The main codebase does deploy correctly. Having said that, what kind of org are you working with? Why does it not have Order and related SObjects enabled?

Hi @ImJohnMDaniel, thanks for the prompt reply!

We already have this package installed in the Trailblazer Community Org (Salesforce Trailhead Org), and we need to update it because the API version of the components is below 45.0 which is the minimum to be able to migrate to ICU Locale Formats.

We use Sobjects but not the Order Object specifically. I was able to install the fflib-apex-mocks package after they fixed the Order issue in this PR in a sandbox cloned from prod. But I still have the same issue with this fflib-apex-common package.

Is it not possible to make a fix similar to what they did for the fflib-apex-mocks package?

@ImJohnMDaniel
Copy link
Contributor

@gsuarez-sfdc -- all of the metadata for the FFLIB Apex Mocks and the FFLIB Apex Common projects are currently at API 63. What "package" are you referring to?

@gsuarez-sfdc
Copy link
Author

gsuarez-sfdc commented Feb 18, 2025

@gsuarez-sfdc -- all of the metadata for the FFLIB Apex Mocks and the FFLIB Apex Common projects are currently at API 63. What "package" are you referring to?

@ImJohnMDaniel I am referring to the API version of the fflib-apex-mocks unlocked package that we have installed in our TBC Org, As you can see in the image below:

Image

API Version 37.0

Image

If you want, I can share a sandbox from my Org so you can test the deploy of the fflib-apex-mocks. Let me know if that is useful for you.

@ImJohnMDaniel
Copy link
Contributor

@gsuarez-sfdc -- The Apex Enterprise Patterns team does not maintain an official "package" of any of the various AEP/FFLIB repos. The team does recommend that customers do package the AEP/FFLIB repos for their own usage and we can advise project teams on the best way to manage these packages, but that is not something that we can support.

Who gave you this package to install?? Based on the screen shots, someone by the name of Jeremiah Johnson built that package that you are using back in December 2018. If that is true, you would definitely not have the latest version of the codebase from the respective projects.

@gsuarez-sfdc
Copy link
Author

@ImJohnMDaniel thanks for the clarification, I thought this was the official repository for those packages.

Yeah it was Jeremiah Johnson who built those packages back in the day, I'll talk to him to see how I can update them.
Thanks for your help!

@gsuarez-sfdc
Copy link
Author

@ImJohnMDaniel you can close this bug, Jeremiah Johnson shared the repository for the packages mentioned above with me. Thanks again!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants