Atlas-Assistance-Dogs / atlas-dogs

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

add ValidUntil date to Background Checks #548

Open atlasjen opened 1 month ago

atlasjen commented 1 month ago

add another field to BackgroundCheck "ValidUntil" let's initially populate it with the value in Date + 1 year and put a trigger in place so that when we upload a new background check it populates.

then update the related list for Background Checks that shows on Contacts to also include this column. let's add it to the right of Completed Date

deb761 commented 3 weeks ago

Is that going to be useful? Or do you really want that field to be on Contact? Or maybe we create a Task that is due a year after a background check to redo it?

atlasjen commented 3 weeks ago

i have a report laura looks at right now but it is proving problematic to get the math right w the options i have in the report so i was thinking adding this field would make it a lot simpler. she scheduled the background checks each quarter right now, to spread them out a bit but not to make it too much of a pain. and whether someone needs a check varies.. i have been thinking about what things to automate and this is a possible one, but we need a bit more logic to it than just after 1 year. we use the System Access field on contact to determine if they still need a check.

i was thinking this calculated field would make it easier to pull a more accurate report.

deb761 commented 2 weeks ago

I think it would be more efficient to run a scheduled Apex that runs once a quarter and sends an email with the results.

atlasjen commented 1 week ago

I checked in w/ laura. presently she assigns herself a task monthly to check who needs them.
there is a report: https://atlasassistancedogs.lightning.force.com/lightning/r/Report/00O4x000007UmTwEAK/view this lets us know the date the previous background check was run on any contacts that require a background or credit check. so we then need to add 1 year in our heads to know when it is due next. Right now it lists any that are w/in the last year but that means some get left out if they are older than that.. i haven't been able to find a good way to query, which is why i was wanting this field.

she would be happy if rather than an email, tasks got assigned to her in the month they are due to run. so say, at the beginning of the month where it has been 1 year AND system access = background check required OR credit check required. So how about an apex job that ran monthly and checked system access and the most recent background check completed date and if it was 11 months ago or more, she got a task to order the background check.

She also just discovered she can't access the above report in prod. she gets this error: image