ildiavolorosso / ExperienceUserUtilities

A FREE set of utilities to manage Experience Cloud users in Salesforce.
Other
2 stars 0 forks source link

Not able to Install - Problems during installation #17

Open manipon opened 1 year ago

manipon commented 1 year ago

We are not able to install the package, here is the error details

This package can’t be installed.
There are problems that prevent this package from being installed.

 

(User.UserContactEmailMatch__c) You referenced an unsupported field type called "Email (Encrypted)" using the following field: LOWER | User.UserContactEmailMatch__c: You referenced an unsupported field type called "Email (Encrypted)" using the following field: LOWER -- | -- (Manage_External_Users_from_Lightning_Experience) In field: field - no CustomField named User.UserContactEmailMatch__c found | Manage_External_Users_from_Lightning_Experience: In field: field - no CustomField named User.UserContactEmailMatch__c found

Are there pre manual steps before installation? Please give suggestion how to resolve this error.

ildiavolorosso commented 1 year ago

Interesting. Are you by chance using Shield encryption on that field?

manipon commented 1 year ago

Is there any pre installation steps? After received this error, I have created new custom field UserContactEmailMatch__c in User object field type as Email, but I haven't add encryption on that field. After new custom field creation also, receiving same error.

ildiavolorosso commented 1 year ago

No, there shouldn't be pre-installation steps. The package contains a few fields that live on the user record to check for mismatches between user email and phone numbers and contact phone and email numbers. This formula field helps with that comparison, and is installed by the package.

I'm not 100% sure why the install is failing in your case. My thinking was that if User.Email was encrypted, it might lead to the error you got above, but that may not be the root cause. Since this field is in a package, it is namespaced and is actually called extuserutilsUserContactEmailMatchc with the namespace. So I don't think you will be able to manually create the field to get around this.

I did come across this thread, which suggests trying the install again but installing for all users. Is that how you installed it the first time?

ildiavolorosso commented 1 year ago

BTW - The more I read (see this), the more I wonder if that email field is indeed encrypted? Since formula fields are not supported when they reference encrypted fields, that seems like a logical root cause of an issue like this.

If field encryption does turn out to be the issue, I suspect I could eventually refactor the flow that uses this formula field to not use this field, which might get around the issue, but I'm not sure I have a way to publish a new version of the package now that I'm no longer with Salesforce.

manipon commented 1 year ago

Thanks for your response. We tried to install for all user, its failed again.

if that email field is indeed encrypted? --> what field you are referring here? verified our user object none of the field is encrypted.

manipon commented 1 year ago

One clarification, is this package allows to manage user from the experience site or in the Salesforce Contact page?

ildiavolorosso commented 1 year ago

That's really interesting. Let me work on creating a new unmanaged version of the package without those fields...or at least with a fairly benign version of those fields.

In general, this package starts with utilities to manage Experience users right from the Contact page in Lightning Experience. But the flows can be extended to work in Experience Sites too, since they illustrate how to work with users and their related contacts.

Which one are you in need of for your org?

ildiavolorosso commented 1 year ago

Do you happen to have a sandbox you can test with? If so, I've created an unmanaged version of the package here. I haven't tested this package myself, but this version has two important changes:

Again, it's important that you NOT install this in your production org, but in a sandbox (dev sandboxes are fine) you don't care too much about. If it installs in that sandbox cleanly, then it's a good bet that your email field is somehow encrypted, or your org thinks it's encrypted.

In any event, this will allow you to get a look at how the Flows are built.

manipon commented 1 year ago

Thanks, will try to install this version.

We are looking for option to activate and deactivate community members from the site. Let me see if I can install successfully first and will extend the flows to site.

Thanks much for your prompt response.

manipon commented 1 year ago

Hi, now we received different error. Here is the detail

This package can’t be installed.
There are problems that prevent this package from being installed.

 

(Deactivate_External_User-31) userProfile_ActiveUser (Screen Component) - We can't find an extension called "extuserutils:flowProfileImage". | Deactivate_External_User-31: userProfile_ActiveUser (Screen Component) - We can't find an extension called "extuserutils:flowProfileImage". -- | -- (External_User_Details-27) cmpUserProfile (Screen Component) - We can't find an extension called "extuserutils:flowProfileImage". | External_User_Details-27: cmpUserProfile (Screen Component) - We can't find an extension called "extuserutils:flowProfileImage".
ildiavolorosso commented 1 year ago

Interesting. I guess for some reason the flows are holding a reference to the namespaced version of the profile component. Sorry for all the hassle!

Let's try another approach. I've created a new version of the managed package with the formula fields changed as described before. I'm hoping that one installs in your sandbox cleanly.

Dcjanes commented 1 year ago

I am seeing this error with the new version on my production system. I had previously installed an older version in my sandbox about a month ago, but didn't finish the deployment due to a death in the family. It is exactly the same error:

This package can’t be installed.
There are problems that prevent this package from being installed.

(User.UserContactEmailMatch__c) No clean data columns available for custom fields.

ildiavolorosso commented 1 year ago

So sorry for your loss!

That strikes me as a new issue. Some rudimentary searching revealed this as well as this known issue:

This sometimes occurs due to an error in the sandbox copying process.

You may attempt to resolve this by creating a new custom field on the object named in the install error, then delete it and then go to the bottom of your list of custom fields to the deleted fields section and erase it.

This will update that object and should allow the install to proceed. You may encounter another similar error, just repeat the process for the next object named.

If you're unable to leverage the workaround above due to also receiving the error upon attempting to create a custom field, a System Administrator will need to log a case with Salesforce Support authorizing the team to run the physical delete process outlined below to resolve the error.

The "No clean data columns available" error is frequently caused by deleted custom field metadata not being properly purged from the application. If this unexpected metadata state is found to be the cause of the issue through Support's investigation they may, with a System Administrator's permission, initiate a manual physical delete process on your behalf to clean out lingering field metadata that may be causing the error message.

Is that worth a try?

manipon commented 1 year ago

Interesting. I guess for some reason the flows are holding a reference to the namespaced version of the profile component. Sorry for all the hassle!

Let's try another approach. I've created a new version of the managed package with the formula fields changed as described before. I'm hoping that one installs in your sandbox cleanly.

Thanks much for your help. We installed this package successfully. Let me try to extend for our needs.

ildiavolorosso commented 1 year ago

Oh good! I'm glad it worked!

Dcjanes commented 1 year ago

Are you saying I should install the new version on Sandbox before trying to install it on production? I can certainly give that a whirl!

ildiavolorosso commented 1 year ago

Oh, sorry for the confusion. My brief comment above was replying to @manipon's comment. I had created a test version for manipon to work around what I think are encryption-related issues in that org. I think the issue you're facing is different.

You're welcome to try the install of the regular package out in a sandbox or a Developer Edition org to give it a whirl. But your sandbox may encounter the same issue as your production org. My thinking on the "No clean data columns available" issue is that you may have some deleted fields on some of the objects the package touches (Accounts, Contacts, Users, etc) that may need cleaning up, as mentioned in this known issue. I can imagine that happening in either a Production environment or a Sandbox, but I don't have a way to test the installation with those conditions in place.

The known issue mentions that running a Physical Delete (PD) should resolve the issue. If you're on Performance or Unlimited Edition, you can initiate the PD yourself (there are instructions in the article). For Enterprise Edition, you have to contact support to initiate it. If you're comfortable trying that, then that seems like the best thing to try next.

And if that doesn't resolve the issue, maybe we can take a look at it live if you have time?

Thanks!

Dcjanes commented 1 year ago

Hmm. I can't even add a field to the User Object manually. I think it is time to open a support case.

ildiavolorosso commented 1 year ago

Hmm. I can't even add a field to the User Object manually. I think it is time to open a support case.

Any luck on that front?