0

I have formula filed Region which is calculated from user role. This field being formula field is dynamic and is changed every time owner of the Opportunity changes his role in a org. Since its a historic data for closed opportunities we would like to lock this region field(Yes Dynamic field and cannot be locked). So we decided to put Text field RegionVisible. Thinking to copy value of Region to RegionVisible.

I have tried Process builder to set the values of RegionVisible when ever the user role changes ([Opportunity].Owner.UserRole.Name ISCHANGED TRUE). The problem with this is that when the opportunity owner is changed the RegionVisible gets the right value from Region but not when opportunity owner (User role) is modified.

I have tried some form of flow looping through all the opportunities the user owns and updating RegionVisible field every time user role changes but at this point I could not find the exact Field in user, where all the user roles are placed as picklist like seen in User details ( User Edit page) so could not trigger the flow correctly (may be). So I am still hanging with the problem. I really need a understanding of User roles but before that I need to get over this issue in hand.

Recourses looked into: Assign Users to Role 1) Edit user and update the role ---> This should suffice my need, but how do trigger my flow or process builder if do not know what exactly gets changed in user object. flow over all

flow trigger conditions

enter image description here

Some help on this simple looking task though not simple for me ): would be highly appreciated.

Update: I was not able to see UserRole Object in our org. Is this something you have noticed ?

4
  • 1
    I imagine, if it's about preserving historical data, what you really want to do is store the region value for the opportunity at a certain point -- likely when the opportunity is closed. If that's right, then there's no need to take action when the opportunity owner changes. What you really need to do is capture the Region field's value when the opportunity stage changes to a closed stage (closed-won, closed-lost). Dec 17, 2021 at 3:02
  • Thank you @Shane Steinfeld, its true that I would like to preserve the historic Data when closed but also would like only one field to be visible to users so every time the opportunity owner changes his role(which is also region dependent) in org I would like to update this RegionVisible field so it reflects right data at current moment even if opportunity is open.
    – tough
    Dec 17, 2021 at 8:19
  • So the formula field is correct as long as the opportunity is open, right? And the value that should be shown once it's closed is the user's role at the time the opportunity closed? If that's the case, perhaps you could use dynamic forms to show the Region formula field when the opp is open, and the RegionVisible field (populated when the opp closes) when the opp is closed. Dec 20, 2021 at 18:22
  • Thank you Shane Steinfeld for you input. I was looking for a way to update RegionVisible field when user changes his role in a Org. Like [Opportunity].Owner.UserRole.Name/Id ISCHANGED = TRUE , then update RegionVisible ( Text) field from Region (formula) field in opportunity itself.
    – tough
    Dec 22, 2021 at 10:15

0

You must log in to answer this question.

Browse other questions tagged .