Atlas-Assistance-Dogs / atlas-dogs

Repository for Atlas Dogs flows in Salesforce
1 stars 1 forks source link

addl changes for AtlasVolunteer role #492

Closed atlasjen closed 2 months ago

atlasjen commented 1 year ago

let's also hide any contact info fields for anyone who is not a volunteer is this doable? i know salesforce uses these to dedupe, so not sure if that is an issue. this would apply to contact and account.

i am thinking we hide these on contact: email, personal email, phone, other phone, alternate email , birthdate, pronoun, specified pronoun, mailing address, other address and hide these on account: phone, billing address, shipping address

deb761 commented 1 year ago

The fields are hidden by the user has access. If we want to hide fields based on position, we need to move them into an action, like we did for the position-specific data.

atlasjen commented 1 year ago

i'm not sure what moving to an action involves. would they still be on the main page or would they be moved to a separate tab? I should also clarify anyone who is in the Volunteer permission set you are working on.. not based on position.

deb761 commented 1 year ago

So you want these fields to be visible in the permission set for contacts with certain positions, but not others? That's the challenging part.

deb761 commented 12 months ago

How about we use sharing rules to hide the non-volunteer contacts, and create a LWC that shows emergency contact information? Or is that even necessary? If we share the emergency contacts with the volunteers?

atlasjen commented 10 months ago

Using Dev branch in a scratch org:

I created new user w Atlas Minimum Access Profile. Note, i did not make them marketing users. I manually added them to AtlasBase and AtlasVolunteer permissions sets

Verified good:

Will need to test in prod

Needs changing:

  1. We are missing related people, for example, their emergency contacts

  2. I was able to delete a lead owned by someone else. I am ok w/ them deleting leads owned by them, but not by someone else.

  3. Volunteer files don't show (blank and NA category do). Note, files classified as Trainer properly don't show. i think keeping blank and NA is good, but we should also include Volunteer.

Here is what i uploaded for a user: image

Here is what i see as the volunteer user: image

deb761 commented 10 months ago
  1. Mmm. I'll look into that. They should have been added to the Volunteer group.
  2. That's a factor of the scratch org having Leads as public rather than private. Try changing the setting in the scratch org. The package doesn't affect that at all.
  3. That sounds like either we're missing a controller permission, or the CategoryRules aren't set properly.
atlasjen commented 9 months ago

let me know when this is ready to retest :)

deb761 commented 9 months ago

Sigh, I suspect including the groups in the package will be problematic.

deb761 commented 9 months ago

It's ready to test, I have a PR for it. But you will need to enable the relationship trigger.

atlasjen commented 9 months ago

Tested again.

sfdx force:user:permset:assign -n AtlasVolunteer -o tuser@atlasdog.org sfdx force:user:permset:assign -n AtlasBase -o tuser@atlasdog.org

I got a popup error about a duplicate user but it made it anyway. I was able to create another contact who was a relationship and see them. So I think we can mark off relationships as working ok. I went back and checked as my scratch user and no other email matched, so not sure what is going on there.

image

So in summary, what needs examining

  1. Why aren't seeing ANY contacts or accounts at all showing up for the atlas volunteer user
  2. Same issue as item 3 above, Volunteer files don't show. I can't see ones already added and I can't add them.
deb761 commented 9 months ago
  1. Sharing Rules need to be defined. I was unable to include them in the project because:

Error: Could not process MDAPI response: Update of SharingCriteriaRule Contact.Volunteer: Error on line 3, col 27: Deploying sharing rule Volunteer not supported for object Contact since it's org wide default is 'Controlled By Parent'

  1. You will need to create the Sharing Rule to test this.
  2. You need to add the user to the Volunteer group to see the categories
  3. I need to make a post-install routine to set the sharing fields. Annoying, yes, but the sharing rules won't let me use a formula field.
atlasjen commented 3 months ago

reopening in 1.8

deb761 commented 2 months ago

Closing this because it is addressed in PR #536. If there are more things to address, please open a new issue. This re-opening of issues makes it hard for me to keep track of what I've worked on. We can always reference closed issues when creating new if we need to refer to history.

Its frustrating when an issue is reopened because I forgot to setup something in a scratch org.

And yes, I might change my mind about this, too.