Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.
DISCLAIMER
All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.
Cireson does not and will not support or maintain these enhancements, extensions, and scripts.
For Team Cireson uploads click here.
Disable CR form once CAB approved
We got requirement from customer request us to disable the CR form after the CAB approval review activity are approved. This is to prevent of any changes after the CAB approval.
There are few idea in my mind now.
1. Get status of review activity and disable the CR form.
2. Create custom field to indicate when to disable the CR form. A workflow to update the field once CAB approved the CR.
Thing that can help:
1. script to determine review activity status.
2. script to disable CR form
Appreciated if anyone can help on this. Thank you
Comments
@alex_marsh you can add an if statement to check if any ChangeRequestForm was loaded for the logged in user. So when you have a Change Request open you can open Developer Tools (F12) and then go to "session.user" and check the ChangeRequestForm value. In this example I have an Assigned Form whose Id is "ChangeManager" in ChangeRequest.js.
Below is the If statement I added to check to see if the user is NOT essentially a Change Manager.
I have got the script running on the Activity Stage (see below) so I don't have to use the Title, however I can't figure out how to make those fields Required.
if (vm.Activity[i].Stage.Name == "Review" && vm.Activity[i].Status.Name == "In Progress")
I did the same with Actual Start and End dates. I haven't figured out how to add " (Required)" to the labels, but that's not a deal breaker.