United Kingdom - D365-CRM

Expand all | Collapse all

Completing a business process flow.

Jump to Best Answer
  • 1.  Completing a business process flow.

    SILVER CONTRIBUTOR
    Posted May 26, 2020 06:28 AM
    Scenario - on a process flow completing, it often (mostly) makes sense to no longer allow users to edit the record. We can even go further and state that such editing could be corrupting or non-compliant - and therefore CRM should somehow protect the record against such change.

    There is no OOTB support for this so I'm wondering how others react to this scenario? What patterns are there?:

    1. A purist could argue that one could do nothing - i.e. that a combination of audit history + training should suffice in preventing bad user behaviour,
    2. One could interrupt the Save event to cancel it,
    3. One could user JavaScript to conditionally make a record read-only.

    In my own scenario, we are weighing up 2 & 3...however I'd really like to know what patterns / responses others have deployed in response to the same.

    Thank you,

    Tamim.




    Making a record conditionally read-only


    CRM

    ------------------------------
    Tamim Sadikali
    ------------------------------


  • 2.  RE: Completing a business process flow.

    MICROSOFT MVP
    Posted May 26, 2020 10:33 AM
    Did you look at using global workflows in the business process flow?  If I understand what you want to do correctly you could use a global worklfow with a trigger of when the process completes and have the workflow change the status of the record.

    ------------------------------
    Feridun Kadir
    Principal Consultant, MVP
    Expert CRM Services Ltd
    Stansted
    ------------------------------



  • 3.  RE: Completing a business process flow.

    SILVER CONTRIBUTOR
    Posted May 26, 2020 12:16 PM
    Ah sorry, I should've covered this - deactivating the record would i think be semantically incorrect. The record remains very much active, from a business perspective. So I'd already discounted that option.

    ------------------------------
    Tamim Sadikali
    ------------------------------



  • 4.  RE: Completing a business process flow.

    MICROSOFT MVP
    Posted May 26, 2020 12:48 PM
    Right, I see.  In that case, I can't think of anything other than what you have already listed.


    ------------------------------
    Feridun Kadir
    Principal Consultant, MVP
    Expert CRM Services Ltd
    Stansted
    ------------------------------



  • 5.  RE: Completing a business process flow.
    Best Answer

    SILVER CONTRIBUTOR
    Posted May 26, 2020 07:25 PM

    I have had similar requirements in the past and there are some options,which I have listed in order of preference:


    Option 1 Status & Status reason
    This is potentially a use case for status reason, eg: status-inactive status reason-process complete. This is effectively the what happens to activity records when they are complete

    Option 2 JavaScript form switch
    Duplicate the entity form, on the duplicate, set all fields to read only. When the process is complete up date the active status reason. Create an onload JavaScript which checks the status reason to load the correct form.

    Option 3 Ownership
    Assign the record to a team or BU on completion to which users only have read access.

    Option 4, Business Rules to lock field
    Use a business rule to lock all fields - a bit of a pain though, although advantage over JavaScript is that it can be applied to the entity rather than the form. 

    Option 5 JavaScript to disable fields
    As you described, but also with a form notification. Slightly easier then Option 3 as you could loop through.

    I would steer well clear of your second option of interrupting the save event as it would not be very user friendly.

    Hope this helps

    Jamie



    ------------------------------
    Jamie Hirst
    https://thatqueer365guy.uk
    Functional Consultant
    Hirst Dynamics
    Stockport
    ------------------------------



  • 6.  RE: Completing a business process flow.

    Posted May 27, 2020 02:43 AM
    Jamie's listed some great alternatives. I'd vote for changing the ownership to a different BU with the appropriate security role that makes the record read-only.

    ------------------------------
    Phil Kermeen
    Three Legs Software Ltd
    ------------------------------



  • 7.  RE: Completing a business process flow.

    SILVER CONTRIBUTOR
    Posted May 27, 2020 04:14 AM
    yep Jamie, thank you - this is just what I was after.

    Options 2 & 3 are what I'll probably end up using. Re. option 1., this of course mirrors e.g. received email behaviour. But I'm wondering how MS have actually implement this? I.e. status and status reason are being used to leverage behaviour, but something else must be implementing read only-ness, right?

    ------------------------------
    Tamim Sadikali
    ------------------------------



  • 8.  RE: Completing a business process flow.

    SILVER CONTRIBUTOR
    Posted Jun 04, 2020 07:08 PM
    Not sure if its much use, but there are form types, I am not sure whether the the form type dictates the behaviour, or whether the type reflects the behaviour. However although you can read it using getFormType, you can not set it.

    ------------------------------
    Jamie Hirst
    https://thatqueer365guy.uk
    Functional Consultant
    Hirst Dynamics
    Stockport
    ------------------------------