Hello,
Let me start by stating that I have done very limited JavaScript and have only used it in the scope of model-driven apps. I have a requirement from a customer for users to provide a free-text reason before moving to a previous stage in a business process flow of a model-driven app.
The concept here is that the target record uses a BPF to traverse through various travel approvals, with different audiences approving at each stage. If an approver finds an edit that needs to be made (i.e. need more location details, invalid cost center, etc.) they send the record back to the appropriate stage to have the edits made. My customer wants the app to require that some type of free-text reason or notes record be provided/added before sending a record back to a previous stage so that the approver/submitter of this previous stage knows why the record was moved back. Has anyone built out a solution for this concept in a model-driven app?
Complexity of this table is very high, so we are not open to creating a custom canvas app just to handle this particular scenario.
I've been reading about the JavaScript OnStageChange Event, which I am thinking is a good starting point, but I am not sure how I would implement it, especially with the added complexity of using this event to trigger some type of pop-up or new field requirement before the record moves back to the previous stage.
I'd be very grateful for any guidance on implementing the above JS or even any alternative solution that is possible in the scope of a model-driven app. Happy to provide more detail if needed!